Nginx + Passenger -- RVM_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > Nginx + Passenger -- RVM

Nginx + Passenger -- RVM

 2010/11/17 22:56:57  myrev  http://myrev.javaeye.com  我要评论(0)
  • 摘要:Nginx+Passenger--RVMYoushouldinstallRVM.1.>geminstallpassenger2.>rvmwrapper1.9.2passenger#1.9.2istherubyversioninRVM,youcanusereeorother..Ifyouusepassenger2.X>rvm1.9.2--passengerRunRVMusingyourdesiredRubyinterpreter,andpassthe'-
  • 标签:Nginx RVM

Nginx + Passenger -- RVM

?

?

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;

?? ?}

?? ?..
发表评论
用户名: 匿名