Installing Passenger with NGINX as non-root

By | December 7, 2017

I am setting up a server where I am not going to use root to install RVM,RoR, NGINX, etc.
So I logon with my user ID and run:

\curl -L | bash -s stable --rails --autolibs=enabled 

RVM, Ruby and Rails all get installed nicely.

rvm -v
ruby -v
rails -v

all return the latest version numbers, just as planned

Now to installing Passenger with NGINX

gem install passenger

Then preparing the /opt/nginx folder

sudo mkdir /opt/nginx
sudo chmod 777 /opt/nginx

as it was complaining it cant create the folder (as I am not root)
Now coming to:


It stops with:

Compiling Passenger support files...
# /home/myapp/.rvm/wrappers/ruby-2.0.0-p0/rake nginx:clean nginx RELEASE=yes
rake aborted!
cannot load such file -- rubygems/builder

Whats next?


You are using Ruby 2.0. Ruby 2.0 is supported since Phusion Passenger 4. Phusion Passenger 3 doesn’t support it. Phusion Passenger 4 is going to be released next week, but for now you can grab Release Candidate 6 with gem install passenger --pre.

Leave a Reply

Your email address will not be published. Required fields are marked *