Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Mongrel under Rails 3 beta 3

#4524

Hey there,
I tryed to deploy my rails app to my server.
After I started Mongrel and visited the site this logfile was created.
I hope this log helps.

Daemonized, any open files are closed. Look at /srv/www/portal/current/tmp/pids/mongrel.8020.pid and /srv/www/portal/current/log/mongrel.8020.log for info. Starting Mongrel listening at 127.0.0.1:8020 ** Starting Rails with production environment... /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in require': no such file to load -- dispatcher (LoadError)

from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:197:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:148:in `rails'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:19:in `load'
from /usr/bin/mongrel_rails:19

Reported by Daniel Spangenberg · May 3rd, 2010 @ 12:42 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Runar2
    Runar2

    I'm experiencing the exact same problem, and it's really annoying.

    June 13th, 2010 @ 09:38 PM

  2. Rohit Arondekar
    Rohit Arondekar

    Can you confirm if this problem still exists on Rails 3 Beta 4?

    It might be that Mongrel doesn't support Rails 3 yet. But please do try and confirm if this issue still exists on Rails 3 Beta 4.

    June 14th, 2010 @ 03:31 PM

  3. knapo
    knapo

    Same on Rails 3.0.0.beta4 (and Rails 2.3.8 as well)

    June 18th, 2010 @ 07:33 PM

  4. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to open
    • Assigned user set to josh

    Confirmed on Rails master with both mongrel 1.1.5 and 1.2.0.pre2.

    I found this issue and I think it's related http://github.com/fauna/mongrel/issues#issue/2

    June 19th, 2010 @ 02:10 AM

  5. Rohit Arondekar
  6. Jean
    Jean
    • Tag changed from rails3 server startup to rails3 server startup, deployment, mongrel, rails3rc
    • Importance changed from to Low

    on rails3-rc I have the exact same problem:

    $ mongrel_rails start
    ** Starting Mongrel listening at 0.0.0.0:3000
    ** Starting Rails with development environment...
    You did not specify how you would like Rails to report deprecation notices for your development environment, please set config.active_support.deprecation to :log at config/environments/development.rb
    /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:219:in `require': no such file to load -- dispatcher (LoadError)
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:219:in `require'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:205:in `load_dependency'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:570:in `new_constants_in'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:205:in `load_dependency'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0.rc/lib/active_support/dependencies.rb:219:in `require'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:148:in `rails'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/bin/mongrel_rails:281
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/bin/mongrel_rails:19:in `load'
        from /home/jean/.rvm/gems/ruby-1.8.7-p299/bin/mongrel_rails:19
    

    mongrel_rails fails to start on a load error
    however starting with the rails server command it says

    => Booting Mongrel
    => Rails 3.0.0.rc application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    You did not specify how you would like Rails to report deprecation notices for your development environment, please set config.active_support.deprecation to :log at config/environments/development.rb
    
    and it starts

    August 7th, 2010 @ 01:21 PM

  7. makkaroni
    makkaroni

    Same thing here:
    rails3.0.0,
    mongrel 1.1.5

    
    test_app# mongrel_rails start
    ** Starting Mongrel listening at 0.0.0.0:3000
    ** Starting Rails with development environment...
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require': no such file to load -- dispatcher (LoadError)
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:148:in `rails'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
        from /usr/local/bin/mongrel_rails:19:in `load'
        from /usr/local/bin/mongrel_rails:19
    

    But using the rails server command:

    
    test_app# rails server
    => Booting WEBrick
    => Rails 3.0.0 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2010-09-02 15:06:56] INFO  WEBrick 1.3.1
    [2010-09-02 15:06:56] INFO  ruby 1.8.7 (2009-06-12) [i686-linux]
    [2010-09-02 15:07:01] INFO  WEBrick::HTTPServer#start: pid=15279 port=3000
    

    September 2nd, 2010 @ 02:15 PM

  8. Jonas
    Jonas

    I get the same error message.

    After I have added gem 'dispatcher' to the Gemfile the mongrel_cluster starts without an error.

    But it does not serve any request:

    Tue Sep 28 23:46:18 +0200 2010: Error calling Dispatcher.dispatch #<NameError: uninitialized constant ActionController::CgiRequest>
    /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in
    process' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:insynchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in process' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:inprocess_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in each' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:inprocess_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:ininitialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in new' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:inrun' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:innew' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:inrun' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in each' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:inrun' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:inrun' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /var/lib/gems/1.8/bin/mongrel_rails:19:in load' /var/lib/gems/1.8/bin/mongrel_rails:19 </code>

    September 28th, 2010 @ 10:49 PM

  9. Henrik Hodne
    Henrik Hodne

    Try adding gem 'mongrel' to your Gemfile and running rails server instead of mongrel_rails, and tell us what your results are. Seems to work just fine for me. I think mongrel_rails was created for Rails 2, and not Rails 3.

    This is what I tested it with:

    › ruby -v
    ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.5.0]
    › rails -v
    Rails 3.0.0
    › gem spec mongrel | ruby -ryaml -rubygems -e "puts YAML.load(STDIN).version.to_s"
    1.1.5
    

    These are the complete steps to reproduce what I did (assuming ruby is installed):

    › gem install rails
    › rails new Rails3TestApp
    › cd Rails3TestApp
    › echo "gem 'mongrel'" > Gemfile
    › bundle install
    › rails generate scaffold foo bar:string
    › rake db:migrate
    › rails server # Then go to localhost:3000/foos in your browser.
    

    Hope this helps.

    September 29th, 2010 @ 04:43 AM

  10. Henrik Hodne
    Henrik Hodne

    Oops, that echo line should be echo "gem 'mongrel'" >> Gemfile. Otherwise it would overwrite the entire file.

    September 29th, 2010 @ 05:57 AM

  11. Jonas
    Jonas

    Hendrik,

    you are right. mongrel with script/rails s mongrel works perfect.

    Seems to be, that mongrel_rails does not work with Rails 3. That's very bad, because many people use mongrel cluster on production.

    http://github.com/fauna/mongrel/issues#issue/2

    But it's not an Rails problem.

    Can any rails dev close that bug?

    Thanks

    September 29th, 2010 @ 07:12 PM

  12. David Trasbo
    David Trasbo
    • State changed from open to invalid

    Done.

    September 29th, 2010 @ 07:46 PM