Phusion乘客和运行多个红宝石版本与阿帕奇

vis*_*shB 3 apache ruby-on-rails passenger

我有两个不同的rails网站分别在ruby 1.8.x和ruby 1.9.11上建立.我已经使用以下代码行配置了我的/etc/httpd/conf/http.conf:

LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-3.0.18/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/passenger-3.0.18
PassengerRuby /opt/ruby-enterprise-1.8.7-2012.02/bin/ruby
Run Code Online (Sandbox Code Playgroud)

正如passenger-install-apache2-module所建议的那样

同样我还添加了替代替代品的进一步必要代码:

<VirtualHost *:80>
      ServerName www.example.com
      # !!! Be sure to point DocumentRoot to 'public'!
      DocumentRoot /somewhere/public    
      <Directory /somewhere/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
      </Directory>   
 </VirtualHost>
Run Code Online (Sandbox Code Playgroud)

一切正常,直到现在,但当我尝试为ruby 1.9.3 app添加另一个配置,并按照上面相同的过程,然后我无法同时运行ruby 1.8.7 app和1.9.3 app.后者成功运行,前者生成错误.

我正在使用rvm管理这两个应用程序,并为每个应用程序分别设置gemsets.

所以,我的问题是,如何同时运行我的两个应用程序.

Jon*_*ald 8

乘客4允许PassengerRuby根据应用设置.

最终版本即将到来,但同时您可以通过它安装它gem install passenger --pre.