?
?
You should install RVM.
?
1. > gem install passenger
?
2. > rvm wrapper 1.9.2 passenger
#1.9.2 is the ruby version in RVM, you can use ree or other..
?
If you use passenger 2.X
?
> rvm 1.9.2 --passenger
Run RVM using your desired Ruby interpreter, and pass the '--passenger' option. This will generate wrapper scripts in RVM's bin directory (see Notes below). These wrapper scripts ensure environment variables such as GEM_HOME and GEM_PATH are set correctly for applications run by passenger.
?
3. > rvmsudo install-passenger-nginx-module
# You should install some dependent lib..
# Passenger will help you install nginx, the folder is in /opt/nginx
?
If you can't install passenger, you need some lib.
http://rvm.beginrescueend.com/packages/
?
?
?
4. > sudo vi /opt/nginx/conf/nginx.conf
?
?
?
http {
?? ?passenger_root /home/programmer/.rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15;
?? ?passenger_ruby /home/programmer/.rvm/bin/passenger_ruby;
?? ?....
?
?
?? ??server {
?? ? ? listen 80;
?? ? ? server_name ac;
?? ? ? root /home/programmer/workspace/AC_rails3/public;
?? ? ? passenger_enabled on;
?? ? ? rails_env development;
?? ?}
?? ?..