Question

I'm using rbenv to manage my Ruby versions but it seems to not work with Phusion Passenger.

Even thought I've added the lines with my rbenv Ruby versions to my /etc/apache2/httpd.conf file, I'm still getting this message:

Web application could not be started
no such file to load -- rack (LoadError)

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/opt/passenger/libexec/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/local/opt/passenger/libexec/helper-scripts/rack-preloader.rb:150
Application root
/Users/julian/Projects/assign
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production
Ruby interpreter command
/usr/bin/ruby

Yet if you look farther down, I think my path is correct:

PATH = /usr/local/heroku/bin:/Users/julian/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

I'm not sure what I need to change to make this work.

Was it helpful?

Solution

I've added the lines w/my rbenv Ruby versions to my /etc/apache2/httpd.conf file

Well, that tells us nothing really, because we can't tell if what you put in was correct.

Passenger's configuration options include the ability to specify which Ruby to use. With Apache use:

PassengerRuby /usr/local/bin/ruby;

For Nginx use:

passenger_ruby /usr/local/bin/ruby;

In nginx.conf, or an included .conf file it'd go inside the http { ... } block. I'm not sure what it'd be with Apache because I'm not using Apache with it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top