RubyRedGrapefruit
RubyRedGrapefruit

Reputation: 12224

Passenger on Nginx will not serve Rails 2.3.8 application after gems vendored

EDIT: Please note that the app comes up just fine in Passenger/Apache2. Just not in Nginx.

I just did a bunch of work getting my gem house in order (i.e. vendoring all my gems and putting the appropriate config.gem lines in environment.rb). I rebuilt all gems and refreshed specs. Upon downloading this code to my staging machine, I can run the console and server fine from the command line, but my Nginx/Passenger stack is NOT serving up the application. Instead, I get the following error:

Passenger encountered the following error:
The application spawner server exited unexpectedly: Unexpected end-of-file detected.

thrown from:

PhusionPassenger::ClassicRails::ApplicationSpawner::Error

The trace is:

0   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb  155 in `start'
1   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb  219 in `spawn_rails_application'
2   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
3   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb  214 in `spawn_rails_application'
4   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 82  in `synchronize'
5   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 79  in `synchronize'
6   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb  213 in `spawn_rails_application'
7   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb  132 in `spawn_application'
8   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb  275 in `handle_spawn_application'
9   /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb    357 in `__send__'
10  /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb    357 in `server_main_loop'
11  /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb    206 in `start_synchronously'
12  /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server   99  

The only thing I can see in my webserver log is:

/Library/Ruby/Gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/utils.rb:708: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

I don't have anything to go on to solve this issue. If I had to guess, I would say that there is some gem somewhere that needs to be compiled locally. However, even when I move everything out of vendor/gems and remove all of the config.gem lines, I get this problem still.

Upvotes: 2

Views: 599

Answers (1)

Hongli
Hongli

Reputation: 18934

Looks like a bug in Ruby. Try upgrading it.

Upvotes: 1

Related Questions