This project is archived and is in readonly mode.

#3917 ✓invalid
Anil Wadghule

uninitialized constant Rack::Runtime error

Reported by Anil Wadghule | February 10th, 2010 @ 03:58 AM

I am running http://planetrubyonrails.net/ with Rails 3.0 beta. (code available at http://github.com/anildigital/planet/commits/master)

During the day I get the passenger error page
with message. It goes when I restart apache .. But it comes again sometime in the day.

Error message:
uninitialized constant Rack::Runtime
Exception class:
NameError
Application root:
/home/anil/public_html/planetrails.digitalcodes.org/current Backtrace:

File Line Location

0 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb 456 in load_missing_constant'<br/> 1 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb 91 inconst_missing'
2 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/inflector/methods.rb 101 in constantize'<br/> 3 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/inflector/methods.rb 100 ineach'
4 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/inflector/methods.rb 100 in constantize'<br/> 5 /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta/lib/action_dispatch/middleware/stack.rb 37 inklass'
6 /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta/lib/action_dispatch/middleware/stack.rb 42 in active?'<br/> 7 /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta/lib/action_dispatch/middleware/stack.rb 122 inactive'
8 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb 158 in find_all'<br/> 9 /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta/lib/action_dispatch/middleware/stack.rb 122 ineach'

Comments and changes to this ticket

  • José Valim

    José Valim February 10th, 2010 @ 06:42 AM

    Which passenger version? You need 2.2.9.

  • westoque

    westoque February 10th, 2010 @ 06:51 AM

    Are you running ruby 1.8?

  • Anil Wadghule

    Anil Wadghule February 10th, 2010 @ 07:00 AM

    ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
    passenger 2.2.4

  • José Valim

    José Valim February 10th, 2010 @ 07:03 AM

    • State changed from “new” to “invalid”

    That is it, you need passenger 2.2.9. Reopen if you have find issues in newest version.

  • Alex Sharp

    Alex Sharp April 19th, 2010 @ 11:45 AM

    This problem seems to be occurring again. I am using passenger 2.2.9, rails3 beta3 and bundler 0.9.21 and I am getting the uninitialized constant Rack::Runtime error. Can anyone else confirm whether or not this is broken in rails 3 beta3?

  • Alex Sharp

    Alex Sharp May 5th, 2010 @ 12:47 AM

    Nevermind my last comment; was an error on my part w/ passenger config. My apologies.

  • YavorIvanov

    YavorIvanov October 7th, 2010 @ 11:47 PM

    • Importance changed from “” to “Low”

    I have the same problem on my production environment.

    Error message:
    uninitialized constant Rack::Runtime

    phusion passenger 2.2.11
    ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 20090928

    Strange thing is the same config works on my Mac with same ruby.
    Is this a phusion passenger thing? Tried all versions and searched for info. Nothing other than this problem seems to pop out in google.

  • Adrian Halamoda

    Adrian Halamoda October 8th, 2010 @ 03:21 PM

    • Tag changed from rails 3.0 beta, error, passenger, rack, rack::runtime, rails, server to rails 3.0 beta, rails 3.0.0, error, passenger, rack, rack::runtime, rails, server

    Noticed the same problem.
    I have ported an app from rails 2.3 to 3.0
    No problems in integration environment.
    On production this error occurs.

    phusion passenger 2.2.15
    ruby 1.8.7 (2010-04-19 patchlevel 253) [i486-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02

    Error message:

    uninitialized constant Rack::Runtime
    

    Exception class:

    NameError
    

    Backtrace:

    #   File    Line    Location
    0   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  192     in `default_middleware_stack'
    1   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  189     in `tap'
    2   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  189     in `default_middleware_stack'
    3   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  161     in `build_middleware_stack'
    4   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application/finisher.rb     35  
    5   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/initializable.rb    25  in `instance_exec'
    6   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/initializable.rb    25  in `run'
    7   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/initializable.rb    50  in `run_initializers'
    8   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/initializable.rb    49  in `each'
    9   /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/initializable.rb    49  in `run_initializers'
    10  /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  134     in `initialize!'
    11  /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  77  in `send'
    12  /home/rails/backoffice/shared/bundle/ruby/1.8/gems/railties-3.0.0/lib/rails/application.rb  77  in `method_missing'
    13  /home/rails/backoffice/releases/20101008131952/config/environment.rb    5   
    14  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    318     in `require'
    15  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    318     in `preload_application'
    16  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    267     in `initialize_server'
    17  /usr/lib/ruby/1.8/phusion_passenger/utils.rb    323     in `report_app_init_status'
    18  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    246     in `initialize_server'
    19  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb  194     in `start_synchronously'
    20  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb  163     in `start'
    21  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb    222     in `start'
    22  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb    253     in `spawn_rails_application'
    23  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb   126     in `lookup_or_add'
    24  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb    247     in `spawn_rails_application'
    25  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb   80  in `synchronize'
    26  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb   79  in `synchronize'
    27  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb    246     in `spawn_rails_application'
    28  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb    145     in `spawn_application'
    29  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb    278     in `handle_spawn_application'
    30  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb  352     in `__send__'
    31  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb  352     in `main_loop'
    32  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb  196     in `start_synchronously'
    33  /usr/lib/phusion_passenger/passenger-spawn-server   61
    
  • YavorIvanov

    YavorIvanov October 8th, 2010 @ 03:26 PM

    Yep! Same Error and Backtrace. I have gotten to a point where I will try upgrading Ruby.

  • José Valim

    José Valim October 8th, 2010 @ 03:27 PM

    If you try to use webrat or thin for booting, does it work? Have you talked to phusion guys?

  • YavorIvanov

    YavorIvanov October 8th, 2010 @ 03:39 PM

    Had Mongrel and Unicorn installed ... also don't work with them.

  • Adrian Halamoda

    Adrian Halamoda October 8th, 2010 @ 03:39 PM

    RAILS_ENV=production rails s - works just fine.

    I tracked it little bit It seems passenger is using
    /home/rails/backoffice/releases/20101008131952/config/environment.rb 5
    14 config.ru 3 in require'<br/> 15 config.ru 3<br/> 16 /usr/lib/ruby/1.8/rack/builder.rb 29 ininstance_eval'
    17 /usr/lib/ruby/1.8/rack/builder.rb 29 in initialize'<br/> 18 config.ru 1 innew'
    19 config.ru

    which is a false (old) rack version 1.0.1 and not the bundler version.

    Is it passeneger or bundler issue?

  • José Valim

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages