Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rbenv and passenger - cannot install from not root user account(sudo group)

I'm just trying to setup my first rails server - on Ubuntu 12.04. I installed rbenv (as user: deployer with groups sudo and admin). Now trying to install passenger according to their docs.

I run passenger-install-nginx-module it starts but then I get

Please specify a prefix directory [/opt/nginx]: 

--------------------------------------------

Permission problems

This installer must be able to write to the following directory:

/opt/nginx

But it can't do that, because you're running the installer as deployer.

Ok, I run sudo passenger-install-nginx-module then, and get sudo: passenger-install-nginx-module: command not found.

Does it mean I have to install it by loggin as root, installing whole rbenv for root user and then install passenger? Every tutorial I read they run it from not root user account :/, it doesn't work for me.

like image 548
Marcin Doliwa Avatar asked Dec 12 '12 21:12

Marcin Doliwa


1 Answers

As I wrote in my comment, you have to run the passenger-install-nginx-module as root with the full path, because it is not in the $PATH var of your bash. To find out the path, run which passenger-install-nginx-module

like image 120
23tux Avatar answered Sep 28 '22 01:09

23tux