Forum: Ruby on Rails Plugin Problems: const_missing: uninitialized constant Rails

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B6861bc75bff3c594212338a914a39ad?d=identicon&s=25 Matt Todd (Guest)
on 2007-07-17 19:23
(Received via mailing list)
I'm receiving this error when I try to start Mongrel on my local
machine. I've checked my Rails, Rake, and Gem versions, as well as all
of the other gems I'm using.

The situation is that I simply started an empty Rails app and
generated an empty plugin. I added the plugin into the
ActionView::Base class in init.rb and really only added one empty
method to the plugin.

There is a controller and the routes have been set up to default to
the bare-bones controller's action index.

I do not get the error if I disable the plugin from loading, but if it
is not disabled, I get this error and Mongrel fails to load.

I doublechecked all of my naming and I don't see any duplicate names.

If anybody could give me any substantive leads in which way to address
this issue, I'd appreciate it. I just haven't found much help via
Google, Google Groups, wikis, or in IRC regarding this issue, or
plugins in general.

B6861bc75bff3c594212338a914a39ad?d=identicon&s=25 Matt Todd (Guest)
on 2007-07-17 20:38
(Received via mailing list)
After further experimentation, the error occurs when I execute the
init.rb file:

ActionView::Base.send :include, CalendarHelper

I tried experimenting with :extend, with changing the CalendarHelper
to class and back, and nothing appears to change the error. It appears
to be an error with how it is being added into the Rails::Initializer

B6861bc75bff3c594212338a914a39ad?d=identicon&s=25 Matt Todd (Guest)
on 2007-07-17 22:30
(Received via mailing list)
It appears the problem was simply that I was not requring in the
library file, which I assumed was being done automatically. Whoops.

init.rb ----------------

require 'calendar'
ActionView::Base.send :include, CalendarHelper
This topic is locked and can not be replied to.