Question

I'm running Ubuntu 12.04 trying to get a Rails 4 application running with Passenger. I'm attempting to use rbenv to configure my ruby/rails environments.

I've installed rbenv via apt (sudo apt-get install rbenv). I have access to all of the rbenv tools (install, which, etc.) The issue comes when passenger tries to run the rails app. I suspect it is simply that the passenger service cannot use the local rubies, as a service doesn't have a home folder, but I'm shooting in the dark there.

The specific error I am getting is: /usr/local/bin/rbenv-install: line 117: rbenv-hooks: command not found

This happens in passenger or if I just run rbenv install 2.1.0 (or whatever version)

Any help would be great, Thanks!

Was it helpful?

Solution

Turns out this was really simple.

When running the Passenger Apache Module, there are a number of configuration variables you can add to your virtual hosts file. Somehow I missed the documentation first go around. The solution ended up being as simple as adding this line to my vhosts file:

PassengerRuby /home/{user}/.rbenv/versions/2.1.0/bin/ruby

All is good now, hope this helps someone else.

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