简体   繁体   中英

Rails 3 + Passenger: Rack error

I'm getting the following error, which spontaneously popped up and crashed my site a few days ago. I'm using Ruby 1.8.7, Rails 3.0.0, on a Dreamhost machine with Passenger. See this cached page for another description of the same problem.

Ruby (Rack) application could not be started.

A source file that the application requires, is missing.

It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.

Error message:
no such file to load -- rack
Exception class:
LoadError
Application root:
[omitted]
Backtrace:
#   File    Line    Location
0   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
1   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
2   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 139 in `load_rack_app'
3   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 100 in `run'
4   /dh/passenger/lib/phusion_passenger/utils.rb    255 in `report_app_init_status'
5   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 87  in `run'
6   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 65  in `spawn_application'
7   /dh/passenger/lib/phusion_passenger/utils.rb    184 in `safe_fork'
8   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 58  in `spawn_application'
9   /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb 41  in `spawn_application'
10  /dh/passenger/lib/phusion_passenger/spawn_manager.rb    159 in `spawn_application'
11  /dh/passenger/lib/phusion_passenger/spawn_manager.rb    287 in `handle_spawn_application'
12  /dh/passenger/lib/phusion_passenger/abstract_server.rb  352 in `__send__'
13  /dh/passenger/lib/phusion_passenger/abstract_server.rb  352 in `main_loop'
14  /dh/passenger/lib/phusion_passenger/abstract_server.rb  196 in `start_synchronously'
15  /dh/passenger/bin/passenger-spawn-server    61  

I also had the same problem with Dreamhost/Passenger/Rails. I send a support request in and received the following response. My sites are also now up and running.


Thank you for contacting technical support. I do apologize for the issues with this. The servers were upgraded to Debian recently which also did some upgrades regarding your install. I went ahead and corrected the sites with errors as some gems needed to be reinstalled.

I do apologize for the issues with this. Please let me know if there is anything else I can do for you and have a good day.

I had to go through the same path. After filing a support ticket app got back on track:

Thank you for contacting technical support. I do apologize for the issues with your site. It looks like there was an issue with your rack Gem. I went ahead and reinstalled the Gem for you and then rebundled your Rails application. Your site is now back up and running. :) I do see that your images are not loading though. Doing some research into this, I see that the files do not exist in your assets folder. You will need to look into this and get the files uploaded to resolve this issue. :)

Please let me know if there is anything else I can do for you and have a great day.

The image problem was not related to this.

I experienced the same problem, it had to do with bundling my gems together correctly. The server was looking for required gems at /usr/lib/ruby/gems/1.8/ . Rerunning bundle install on the server corrected my problems. Hopefully this will help someone else, as this problem seems to have many causes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM