passenger-config returns "no such file to load -- phusion_passenger"

806 views
Skip to first unread message

Thibaut Barrère

unread,
Dec 16, 2013, 9:32:27 AM12/16/13
to phusion-...@googlegroups.com
Hello,

I'm getting the following error when running passenger-config:

$ passenger-config
/usr/bin/passenger-config:29:in `require': no such file to load -- phusion_passenger (LoadError)
from /usr/bin/passenger-config:29

This is a setup on which I have uninstalled a gem-based passenger 3 to replace it with a package-based passenger 4 (debian). It also happens to run a version of Ruby 1.8.7 (the server is being upgraded to 1.9.3 with RVM, the reason why I upgraded too to Passenger 4).

Do you have a hint of what may be happening here and how to solve it?

thanks in advance!

-- Thibaut

Hongli Lai

unread,
Dec 16, 2013, 9:33:46 AM12/16/13
to phusion-passenger
Hi Thibaut. Which version of Passenger 4 do you have installed? What is your currently active Ruby interpreter? (type 'which ruby')


--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phusion-passen...@googlegroups.com.
To post to this group, send email to phusion-...@googlegroups.com.
Visit this group at http://groups.google.com/group/phusion-passenger.
To view this discussion on the web visit https://groups.google.com/d/msgid/phusion-passenger/2b3060cb-7ff0-43df-bfc9-0ea4752b6b75%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
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)

Thibaut Barrère

unread,
Dec 16, 2013, 9:40:00 AM12/16/13
to phusion-...@googlegroups.com
Hello Hongli!


Which version of Passenger 4 do you have installed?

It seems to be 4.0.29: 

$ dpkg -l | grep passenger
ii  libapache2-mod-passenger             1:4.0.29-1~squeeze1          Rails and Rack support for Apache2
ii  passenger                            1:4.0.29-1~squeeze1          Rails and Rack support for Apache2 and Nginx
ii  passenger-dev                        1:4.0.29-1~squeeze1          Rails and Rack support for Apache2 and Nginx
ii  passenger-doc                        1:4.0.29-1~squeeze1          Rails and Rack support for Apache2 - Documentation
 
What is your currently active Ruby interpreter? (type 'which ruby')

This gives:

$ which ruby

/usr/local/bin/ruby


-- Thibaut

Hongli Lai

unread,
Dec 16, 2013, 9:43:20 AM12/16/13
to phusion-passenger
When using the Debian package, you are supposed to use /usr/bin/ruby for running the Passenger commands. Try this: /usr/bin/ruby -S passenger-config

I'll modify the Debian packages so that in the next release it'll work even if you're not using /usr/bin/ruby.

Thibaut Barrère

unread,
Dec 16, 2013, 9:51:49 AM12/16/13
to phusion-...@googlegroups.com
Hi,

> When using the Debian package, you are supposed to use /usr/bin/ruby for running the Passenger commands. Try this: /usr/bin/ruby -S passenger-config
> I'll modify the Debian packages so that in the next release it'll work even if you're not using /usr/bin/ruby.

great - it works this way!

My goal here is to move to RVM, and figure out the correct path for PassengerRuby etc. Is there a way to use passenger-config with RVM on Debian?

I tried a few variations but could not get something that works.

Or maybe I should just define the wrapper path myself if this doesn't work yet on Debian (ex: ~/.rvm/wrappers/xxx-y.z@gemset/ruby) ?

thanks,

-- Thibaut

Hongli Lai

unread,
Dec 16, 2013, 9:59:32 AM12/16/13
to phusion-passenger
You can just define the wrapper path yourself. All passenger-config --ruby-command does is printing the path to the wrapper script.

You can also hot patch the passenger commands. Open /usr/bin/passenger-config (and other passenger commands), look for require "phusion_passenger", and change it into require "/usr/lib/ruby/vendor_ruby/phusion_passenger".

Thibaut Barrère

unread,
Dec 16, 2013, 10:02:54 AM12/16/13
to phusion-...@googlegroups.com
You can just define the wrapper path yourself. All passenger-config --ruby-command does is printing the path to the wrapper script.
You can also hot patch the passenger commands. Open /usr/bin/passenger-config (and other passenger commands), look for require "phusion_passenger", and change it into require "/usr/lib/ruby/vendor_ruby/phusion_passenger".

Thanks for the quick and detailed answer - much appreciated.

Have a great day,

-- Thibaut
Reply all
Reply to author
Forward
0 new messages