Why is the PassengerRuby option ignored by PassengerPreStart?

144 views
Skip to first unread message

Dave James Miller

unread,
Feb 5, 2012, 6:05:53 PM2/5/12
to phusion-...@googlegroups.com
In my Apache config I have:

LoadModule passenger_module /home/ruby/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /home/ruby/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.11
PassengerRuby /home/ruby/.rvm/wrappers/ruby-1.9.2-p290/ruby
PassengerPreStart http://www.example.com/

PassengerMinInstances 1

When I restart Apache the application is not started, and the error log says:

/usr/bin/env: ruby: No such file or directory

This is because there is no system-wide copy of Ruby installed - as you can see I am using RVM.

Looking through the archives I've seen a few people with the same problem, and the only suggestion I found was to fix the PATH to include Ruby... But since I specifically set the PassengerRuby option, shouldn't that be used to launch the helper script instead?

Thanks
Dave

Hongli Lai

unread,
Feb 6, 2012, 3:25:48 AM2/6/12
to phusion-...@googlegroups.com

It currently does not do that. Although the prestart script is written
in Ruby it doesn't care *which* Ruby, unlike the web apps which very
much do care which Ruby it is. For now you should just fix your PATH.

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Reply all
Reply to author
Forward
0 new messages