Link to home
Start Free TrialLog in
Avatar of markm5i
markm5i

asked on

Ruby Gems Passenger Error

Am receiving the following error when trying to restart Apache:

from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
      from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
      from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
      from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99
[ pid=361 thr=47847139417536 file=ext/apache2/Hooks.cpp:860 time=2011-12-19 09:44:32.294 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/oci/rails_apps/ocho': The spawn server has exited unexpectedly.
  Backtrace:
     in 'virtual Passenger::SessionPtr Passenger::ApplicationPool::Client::get(const Passenger::PoolOptions&)' (Client.h:742)
     in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:292)
     in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:561)
Avatar of Linux Guru
Linux Guru
Flag of India image

Did you set the variable "Set Env" for ruby in your VirtualHost configuration?  It might looks like this.

<VirtualHost *:80>
    DocumentRoot /home/user/repos/rails_project/public
    ServerName rails.local
    ServerAlias *.rails.local
    RailsEnv development
    RailsAllowModRewrite off
    SetEnv GEM_HOME /home/user/rvm/gems/rub/
......................
.....................

Also make sure the path to ruby exists and executable.
Avatar of markm5i
markm5i

ASKER

Have tried this - now this is the error in the error log:
[ pid=6643 thr=47356637109696 file=ext/apache2/Hooks.cpp:860 time=2011-12-19 13:28:44.897 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/oci/rails_apps/ocho': The spawn server has exited unexpectedly.
Could you check if sqlite3-ruby is installed? If no, please install it.
One more suggestion: Remove the /tmp/passenger.* directories and see the results.
Avatar of markm5i

ASKER

sqlite3 is installed and I've removed the /tmp/passenger.* directory - still the same result:  pid=9953 thr=47411489164736 file=ext/apache2/Hooks.cpp:860 time=2011-12-19 17:51:06.320 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/oci/rails_apps/ocho': The spawn server has exited unexpectedly.
Ok. Could you try to change the working directory from /tmp to some other directory (/var or something) ?
Avatar of markm5i

ASKER

I don't understand - change the working directory where exactly?
You can change the /tmp/passenger location by adding the following line in virtual host entry.

PassengerUploadBufferDir /var/tmp/passenger

If its not working just remove the above line. Its just a trial and error method.
Avatar of markm5i

ASKER

That line does not exist. Tried adding it and am getting the following when I try to restart Apache:

from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
      from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99
[ pid=12296 thr=47411489164736 file=ext/apache2/Hooks.cpp:860 time=2011-12-20 08:34:44.240 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/oci/rails_apps/ocho': The spawn server has exited unexpectedly.
  Backtrace:
     in 'virtual Passenger::SessionPtr Passenger::ApplicationPool::Client::get(const Passenger::PoolOptions&)' (Client.h:742)
     in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:292)
     in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:561)

[Tue Dec 20 07:05:11 2011] [notice] Graceful restart requested, doing restart
WARNING: The 'RailsAllowModRewrite' option is obsolete: Phusion Passenger now fully supports mod_rewrite. Please remove this option from your configuration file.[Tue Dec 20 07:05:11 2011] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Phusion_Passenger/3.0.11 configured -- resuming normal operations
[Tue Dec 20 07:09:06 2011] [notice] caught SIGTERM, shutting down
ASKER CERTIFIED SOLUTION
Avatar of Linux Guru
Linux Guru
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.