I have been getting this error on the production server after rails was updated to 2.0.2 and moreover this worked perfectly in the development mode. This crash occurs when no one is using the app for an hour or so. This is the error that I get in the logs. (nohup.out file). The production log doesnt show anything unusual. Please help me out guys. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:98:in `reload!'': undefined method `reset_application!'' for ActionController::Dispatcher:Class (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:95:in `synchronize'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:95:in `reload!'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:165:in `reload!'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:178:in `setup_rails_signals'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/configurator.rb:303:in `call'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/configurator.rb:303:in `join'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel Thanks in advance. -- Posted via http://www.ruby-forum.com/.
On Tue, Mar 18, 2008 at 8:47 AM, James George <lists at ruby-forum.com> wrote:> I have been getting this error on the production server after rails was > updated to 2.0.2 and moreover this worked perfectly in the development > mode. This crash occurs when no one is using the app for an hour or so. > This is the error that I get in the logs. (nohup.out file). The > production log doesnt show anything unusual. Please help me out guys. > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:98:in > `reload!'': undefined method `reset_application!'' for > ActionController::Dispatcher:Class (NoMethodError) > fromIt seems you''re getting a restart/reload signal to the mongrel process, and it is trying to reload the Rails environment calling the reset_application! method of ActionController::Dispatcher There is no ActionController::Dispatcher, but there is a Dispatcher in the global namespace (::Dispatcher)? I cannot test it since Windows don''t generate the HUP signal required for this, but I think I''m in the good path. HTH, -- Luis Lavena Multimedia systems - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams
The problem is that the method reset_application! is no longer available in rails 2.0, but Mongrel 1.1.4 is still using it in lib/mongrel/rails.rb. I think you should be able to fix this problem by commenting out the line trap("HUP") { log "HUP signal received."; reload! } in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb. Till -- Posted via http://www.ruby-forum.com/.
On Wed, 21 May 2008 14:41:40 +0200 Till Mossakowski <lists at ruby-forum.com> wrote:> The problem is that the method reset_application! is no longer available > in rails 2.0, but Mongrel 1.1.4 is still using it in > lib/mongrel/rails.rb.Do we know if that needs a fix? -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/
>> The problem is that the method reset_application! is no longer available >> in rails 2.0, but Mongrel 1.1.4 is still using it in >> lib/mongrel/rails.rb. > > Do we know if that needs a fix?Surely it needs. My fix only is a hack. Probably reset_application should be replaced with reload_application, but I am not sure. Till -- Posted via http://www.ruby-forum.com/.
I have tested out my fix and strangely, it did not work. I have now commented out the line containing reset_application! in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb. Till -- Posted via http://www.ruby-forum.com/.
This line is for the reload signal that always says "Might not work well" at startup, right? Did it used to work well? If nobody really uses it might be better to remove it; otherwise, we should try to get it to work well (which can be hellish with Rails'' dependency system). Evan On Fri, May 23, 2008 at 7:37 AM, Till Mossakowski <lists at ruby-forum.com> wrote:> I have tested out my fix and strangely, it did not work. I have now > commented out the line containing reset_application! in > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb. > > Till > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Evan Weaver
On Fri, 23 May 2008 13:03:58 -0400 "Evan Weaver" <evan at cloudbur.st> wrote:> This line is for the reload signal that always says "Might not work > well" at startup, right? Did it used to work well? If nobody really > uses it might be better to remove it; otherwise, we should try to get > it to work well (which can be hellish with Rails'' dependency system).It used to work OK, but it relies on the internal Rails reload mechanism used for development mode. It was intended to let you run your rails app in production and then hit it to kick it over rather than wait for a reload. I''d say these days it''s not needed and it risks running into changes in how Rails operates. Probably worth dropping. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/
Ok, good. That reload mechanism won''t work with most people''s Capistrano deploys anyway because the new app code is in a different working directory. I''ll make a ticket to remove it for 1.2. Evan On Fri, May 23, 2008 at 1:12 PM, Zed A. Shaw <zedshaw at zedshaw.com> wrote:> On Fri, 23 May 2008 13:03:58 -0400 > "Evan Weaver" <evan at cloudbur.st> wrote: > >> This line is for the reload signal that always says "Might not work >> well" at startup, right? Did it used to work well? If nobody really >> uses it might be better to remove it; otherwise, we should try to get >> it to work well (which can be hellish with Rails'' dependency system). > > It used to work OK, but it relies on the internal Rails reload > mechanism used for development mode. It was intended to let you run > your rails app in production and then hit it to kick it over rather > than wait for a reload. > > I''d say these days it''s not needed and it risks running into changes in > how Rails operates. Probably worth dropping. > > -- > Zed A. Shaw > - Hate: http://savingtheinternetwithhate.com/ > - Good: http://www.zedshaw.com/ > - Evil: http://yearofevil.com/ > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Evan Weaver
> It used to work OK, but it relies on the internal Rails reload > mechanism used for development mode. It was intended to let you run > your rails app in production and then hit it to kick it over rather > than wait for a reload."It used to work OK" must refer to rails 1.2, since in rails 2.0, the method reset_application! is simply not available, and therefore the reload NEVER works with rails 2.0. -- Posted via http://www.ruby-forum.com/.