highBandWidth
highBandWidth

Reputation: 17316

Installing passenger nginx

I installed the passenger gem, but it didn't work with my old nginx. So I am trying to install nginx from the passenger script.

I do $ sudo ./bin/passenger-install-nginx-module, which gives

 * rack... not found
 * To install rack:
   Please install RubyGems first, then run /home/dbadmin/.rvm/wrappers/[email protected]/gem install rack

Although the rack gem is in fact installed. Anyway, I do

$ /home/dbadmin/.rvm/wrappers/[email protected]/gem install rack
Successfully installed rack-1.4.1
1 gem installed
Installing ri documentation for rack-1.4.1...
Installing RDoc documentation for rack-1.4.1...

After this, $ sudo ./bin/passenger-install-nginx-module again says that * rack... not found.

What might be happening?

Upvotes: 1

Views: 663

Answers (2)

Averenix
Averenix

Reputation: 408

If you're going to use sudo with rvm, you need to use rvmsudo - because sudo doesn't run root's profile (i.e. doesn't load RVM) when it changes to the root user.

rvmsudo ./bin/passenger-install-nginx-module

Upvotes: 2

platforms
platforms

Reputation: 2726

I had the same issue recently and I believe it was confusion related to rvm gemsets. To move forward, I needed to install the rack gem as root into the system's gemset before passenger's installer could find it and proceed.

Upvotes: 1

Related Questions