I''m trying to get a rails app running with this configuration: Mongrel, Apache 2.2, mod_proxy load balancer and Rails 1.1.6 error I have a rails app on another server working with (apparantly) the same configuration and it runs fine so I''m stumped. I''m wondering if anyone has any insight into the error I have pasted below. It seems to be one of those errors that is a side effect of something else, possibly a misconfiguration on my part. Thanks!!! ~Wayne =======================================================================** Daemonized, any open files are closed. Look at /home/project/ shared/log/mongrel.1080.pid and /home/project/shared/log/mongrel. 1081.log for info. ** Starting Mongrel listening at 127.0.0.1:1081 ** Starting Rails with production environment... /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb: 280:in `send'': undefined method `cache_template_loading='' for ActionController::Base:Class (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:280:in `initialize_framework_settings'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:279:in `initialize_framework_settings'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:276:in `initialize_framework_settings'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:93:in `process'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:42:in `run'' from /home/project/current/config/environment.rb:10 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/rails.rb:161:in `rails'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:112:in `cloaker_'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:134:in `listener'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:98:in `cloaker_'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/configurator.rb:51:in `initialize'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:85:in `run'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/command.rb:211:in `run'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:231 from /usr/local/bin/mongrel_rails:18
On Sun, 22 Oct 2006 16:53:23 -0400 "Wayne E. Seguin" <wayneeseguin at gmail.com> wrote:> I''m trying to get a rails app running with this configuration: > > Mongrel, Apache 2.2, mod_proxy load balancer and Rails 1.1.6 error > > > I have a rails app on another server working with (apparantly) the > same configuration and it runs fine so I''m stumped. > > I''m wondering if anyone has any insight into the error I have pasted > below. > > It seems to be one of those errors that is a side effect of something > else, possibly a misconfiguration on my part.Looks like you might have created a method named "send", but that''s a Ruby reserved method. If you do this all sorts of bad things happen. But, that''s just from a quick glance. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
> Looks like you might have created a method named "send", butthat''s a Ruby reserved method. If you do this all sorts of bad things happen.. > > But, that''s just from a quick glance. I wish this were the case because it would be an easy fix. When I run mongrel_rails on my local development machine it runs fine but on the production server I get that error message... This leads me to believe that it''s a configuration error on my part on the server however I''m unsure as to where to look. Thanks! ~Wayne
Try running mongrel_rails start -e production on your development machine (make sure your config/database.yml is configured properly). To me, it looks like there''s some caching problems somewhere in your app. On 10/23/06, Wayne E. Seguin <wayneeseguin at gmail.com> wrote:> > > Looks like you might have created a method named "send", but > that''s a Ruby reserved method. If you do this all sorts of bad > things happen.. > > > > But, that''s just from a quick glance. > > > I wish this were the case because it would be an easy fix. > > When I run mongrel_rails on my local development machine it runs fine > but on the production server I get that error message... > This leads me to believe that it''s a configuration error on my part > on the server however I''m unsure as to where to look. Thanks! > > ~Wayne > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Out of curiosity, do you use migrations? Look at your migration class names and make sure it doesn''t conflict with any "reserved" class names. I now prepend all my migration classes with Migration<class_name> because this one bit me before. Not the exact error, but similar results. -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061023/de582003/attachment.html
Andrew, Yes I do use migrations extensively and I do prepend all of the class names with Create, Add, Remove etc. Thank you VERY much for the heads up but this does not appear to be cause the error :( Thanks! Eden, This does indeed give a new error: ======================================================================== ================================= > mongrel_rails start -e production ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with production environment... /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:123:in `const_missing'': uninitialized constant Cacher (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/ lib/active_support/dependencies.rb:131:in `const_missing'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/ lib/active_support/inflector.rb:161:in `constantize'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/ lib/active_support/core_ext/string/inflections.rb:59:in `constantize'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/ lib/active_record/observer.rb:24:in `observers='' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/ lib/active_record/observer.rb:22:in `each'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/ lib/active_record/observer.rb:22:in `observers='' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:280:in `send'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/ initializer.rb:280:in `initialize_framework_settings'' ... 19 levels... from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/command.rb:211:in `run'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:231 from /usr/local/bin/mongrel_rails:18:in `load'' from /usr/local/bin/mongrel_rails:18 ======================================================================== ================================= So if it is a caching issue then did I configure something improperly somewhere? Any further insight is GREATLY appreciated. Thank you very much!!! ~Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061023/b878d022/attachment-0001.html
The last email I sent wasn''t entirely correct, the error is the same on my local when trying production environment: mongrel_rails start -e production ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with production environment... /Users/wayne/public_html/project/config/../vendor/rails/railties/lib/ initializer.rb:280:in `send'': undefined method `cache_template_loading='' for ActionController::Base:Class (NoMethodError) from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:280:in `initialize_framework_settings'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:279:in `each'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:279:in `initialize_framework_settings'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:276:in `each'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:276:in `initialize_framework_settings'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:93:in `process'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:42:in `send'' from /Users/wayne/public_html/project/config/../vendor/rails/ railties/lib/initializer.rb:42:in `run'' ... 12 levels... from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/ mongrel/command.rb:211:in `run'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/ mongrel_rails:231 from /usr/local/bin/mongrel_rails:18:in `load'' from /usr/local/bin/mongrel_rails:18
On 10/22/06, Wayne E. Seguin <wayneeseguin at gmail.com> wrote:> =======================================================================> ** Daemonized, any open files are closed. Look at /home/project/ > shared/log/mongrel.1080.pid and /home/project/shared/log/mongrel. > 1081.log for info. > ** Starting Mongrel listening at 127.0.0.1:1081 > ** Starting Rails with production environment... > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb: > 280:in `send'': undefined method `cache_template_loading='' for > ActionController::Base:Class (NoMethodError)Check your production.rb and/or environment.rb Do you have a "config.observers =" line in there?
Found it. It was a configuration issue. This line was in the projects environment file: production.rb file for some reason: config.action_controller.cache_template_loading = true Which I''m guessing is a planned rails 1.2 feature? I''ve removed ( commented ;) ) this for now from the code base. Thanks to all those who had suggestions!
Actually, yes I do. Why? Thanks Wilson!!! ~Wayne On Oct 23, 2006, at 22:14 , Wilson Bilkovich wrote:> On 10/22/06, Wayne E. Seguin <wayneeseguin at gmail.com> wrote: >> ===================================================================== >> ==>> ** Daemonized, any open files are closed. Look at /home/project/ >> shared/log/mongrel.1080.pid and /home/project/shared/log/mongrel. >> 1081.log for info. >> ** Starting Mongrel listening at 127.0.0.1:1081 >> ** Starting Rails with production environment... >> /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb: >> 280:in `send'': undefined method `cache_template_loading='' for >> ActionController::Base:Class (NoMethodError) > > Check your production.rb and/or environment.rb > Do you have a "config.observers =" line in there? > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
On 10/23/06, Wayne E. Seguin <wayneeseguin at gmail.com> wrote:> On Oct 23, 2006, at 22:14 , Wilson Bilkovich wrote: > > > On 10/22/06, Wayne E. Seguin <wayneeseguin at gmail.com> wrote: > >> ====================================================================> > Check your production.rb and/or environment.rb > > Do you have a "config.observers =" line in there? > > _______________________________________________ > > Actually, yes I do. > Why? >If you load observers during the ''config'' process, and the code in those observers requires the full Rails environment to be loaded, the boot process will fail. This is easier to do than it sounds, because you are often observing ActiveRecord classes, and those will not have been loaded yet. Your second stack trace looked a lot like the one you get when encountering this problem.