【发布时间】:2013-10-06 21:22:12
【问题描述】:
曾经在我的 vps 中有这个红宝石列表:
ruby-1.9.2-p320 [ i686 ]
=* ruby-1.9.3-p194 [ i686 ]
ruby-1.9.3-p374 [ i686 ]
ruby-1.9.3-p392 [ i686 ]
今天我在ruby 2.0的这个vps上安装了一个新应用,所以我在rvm上加了2.0:
ruby-1.9.2-p320 [ i686 ]
ruby-1.9.3-p194 [ i686 ]
ruby-1.9.3-p374 [ i686 ]
ruby-1.9.3-p392 [ i686 ]
=* ruby-2.0.0-p247 [ i686 ]
安装了passenger 和passenger-apache-module,说明说要添加这些行:
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby
到/etc/apache2/apache2.conf 并重启apache,重启后我得到了这个error:
Syntax error on line 242 of /etc/apache2/apache2.conf:
Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
还有一个问题,当我在http://nccm.md 打开我的应用程序时,我得到了:
Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound)
从gem list 命令我可以看到这个gem 安装在ruby 2.0 环境中,但应用程序在usr/local/rvm/gems/ruby-1.9.3-p194@global 中查找它。这是为什么?感谢您的帮助。
【问题讨论】:
-
我加入了这些问题。我有同样的问题,但我使用的是 nginx 服务器。旧应用程序在 1.9.3 版本上运行。 2.0.0 上的新应用。当我在 Gemfile 中更改 ruby 版本并将旧应用程序中的 deploy.rb 更改为 2.0.0 时,它可以工作,但我不想在所有应用程序中都这样做。
-
@KRH - 解决了,看看
标签: ruby apache2 rvm passenger vps