I am new to Rails and trying to deploy an application to a CentOS server. I have chosen to use RVM as it seems to be highly recommended. I am open to Nginx, Apache or Passenger Stand Alone — whatever works and is easiest.
I have struggled with this install but think that I have successfully cleaned up after myself and have now followed the instructions for single user (non-sudo) rvm install (including ssh).
One thing I don’t understand is how Passenger should be installed (given that RVM is being used)?:
gem install passenger
sudo gem install passenger
rvmsudo gem install passenger
I assume that however it is installed, it should be started in the same way. I have tried each of these methods, but encounter problems in all cases.
When I started Passenger with sudo, I received:
Could not find factory_girl-3.6.1 in any of the sources (Bundler::GemNotFound)
I noticed that sometimes my ruby version would be 1.8.7 even if I set it to 1.9.3-p194 with RVM, so I uninstalled 1.8.7 (had been installed prior to RVM) and reinstalled 1.9.3-p194 (using RVM and specifying openssl again). I reinstalled passenger
Now when I do “sudo passenger start”, I just get a new prompt as though nothing happened. Also if I do “sudo gem install passenger”.
Finally, I notice that if I start passenger with rvmsudo that the webserver does start, however it gives an error to the console:
/usr/bin/evn: ruby: Permission denied
Any help would be greatly appreciated.
You should not use
sudo:However if you used
sudo/rvmsudo– you could change permissions of some of the directories, if any of them are reported as not accessible then use this commands to fix them: