[英]How to update Ruby version on my Rack based server
I use Rack on my server. 我在服务器上使用机架。 I use Passenger on my server.
我在服务器上使用乘客。 I use Capistrano on my server.
我在服务器上使用Capistrano。 I do not yet use RVM on my server.
我尚未在服务器上使用RVM。 I currently have ruby 1.8.7 install on the server, but would like to update to 1.9.2 because of a gem.
我目前在服务器上安装了ruby 1.8.7,但是由于有宝石,我想更新到1.9.2。 Technically, I think I have both, but ruby -v yields 1.9.2.
从技术上讲,我想我两者都有,但是ruby -v的结果为1.9.2。
How do I update Ruby on the server so that Rack will use the new version? 如何在服务器上更新Ruby,以便Rack使用新版本?
I updated Ruby on the system, but Rack still uses gems from 1.8 ie. 我在系统上更新了Ruby,但是Rack仍然使用1.8以后的gem。 "home/USER/shared/bundle/ruby/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb"
“ home / USER / shared / bundle / ruby / 1.8 / gems / activesupport-3.0.9 / lib / active_support / dependencies.rb”
I figure it out. 我知道了。 You must edit /etc/apache2/apache2.conf and change the value of PassengerRuby to the new location of ruby.
您必须编辑/etc/apache2/apache2.conf并将PassengerRuby的值更改为ruby的新位置。 In my case, since I also installed RVM, the new dir was /usr/local/rvm/wrappers/ruby-1.9.2-p290/ruby
就我而言,由于我还安装了RVM,因此新目录为/usr/local/rvm/wrappers/ruby-1.9.2-p290/ruby
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.