开发者

Passenger error - PhusionPassenger::ClassicRails::ApplicationSpawner::Error

Ruby on rails project: I upgraded my files on server (app, config), runned bundle install successfully. Then passenger throwed exeption. It didn't make me any sence. What that could be? Can I get anywhere detailed description for exeption?

Exeption on apache error_log: 
(eval):1: warning: already initialized constant RAILS_ROOT
[ pid=26440 thr=23860019550640 file=utils.rb:176 time=2010-12-13 17:33:29.576 ]: *** Exception NameError in application (wrong constant name LddkProjekts
) (process 26440, thread #<Thread:0x2b66affab360>):
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:334:in `const_get'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:334:in `find_rack_app'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:308:in `start_request_handler'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails开发者_JAVA百科/application_spawner.rb:275:in `send'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/utils.rb:479:in `safe_fork'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:180:in `start'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/helper-scripts/passenger-spawn-server:99
[ pid=26386 thr=23860019550640 file=utils.rb:176 time=2010-12-13 17:33:29.585 ]: *** Exception IOError in PhusionPassenger::ClassicRails::ApplicationSpawner (Connection closed) (process 26386, thread #<Thread:0x2b66affab360>):
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/app_process.rb:105:in `read_from_channel'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:287:in `handle_spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:180:in `start'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.0/helper-scripts/passenger-spawn-server:99

Thank you!


You need to change the RailsBaseURI directive to RackBaseURI in your apache config file. RailsBaseURI was meant for Rails 1 and Rails 2 applications, whereas RackBaseURI is the way to go for Rails 3.

Someone reported, that a missing config.ru file resulted in the same error message.

You might want to check out the discussion at http://groups.google.com/group/phusion-passenger/browse_thread/thread/e5c7495a6fef4ba7.


Please check the version of Gems you are using. In my case there was an issue in Gemfile. In my case i was using lower version of gem 'rubyzip', '0.9.9', i updated that to gem 'rubyzip', '1.0.0' which resolved the issue. ruby zip

Thanks Deepu

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜