简体   繁体   English

为多个Ruby-on-Rails应用程序运行多种版本的Passenger

[英]Running Multiple Versions of Passenger for Multiple Ruby-on-Rails Applications

After I install the Passenger Apache2 module, it gives me something like: 安装乘客Apache2模块后,它会给我类似以下内容:

LoadModule passenger_module /home/passenger/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /home/passenger/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.17
PassengerRuby /home/passenger/.rvm/wrappers/ruby-1.9.2-p290/ruby

(Sorry, I have a user account called passenger . Don't be confused.) (对不起,我有一个名为passenger的用户帐户。请不要混淆。)

So if I want to deploy another rails app that uses totally different version of ruby, then I believe it will give something similar with above configurations BUT with different ruby version, for example: 因此,如果我想部署另一个使用完全不同版本的ruby的rails应用程序,那么我相信它会提供与上述配置类似但使用不同版本的ruby的东西,例如:

LoadModule passenger_module /home/passenger/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /home/passenger/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17
PassengerRuby /home/passenger/.rvm/wrappers/ruby-1.9.3-p194/ruby

Then how can I config the Apache2 (I'm NOT asking the Virtual Host part)? 那我该如何配置Apache2(我不问虚拟主机部分)? Because there are two versions of LoadModule passenger_module . 因为有两个版本的LoadModule passenger_module I don't think one Apache2 server can load two different versions of passenger_module , right? 我认为一台Apache2服务器不能加载两种不同版本的passenger_module ,对吗?

I'm so confused. 我很混乱。 Please help me out. 请帮帮我。

Passenger supports multiple Ruby interpreters as of version 4.0.0. 从4.0.0版开始,Passenger支持多个Ruby解释器。 The PassengerRuby config option has been made a per-virtual host option, so you can customize your Ruby interpreter on a per-application basis. PassengerRuby config选项已成为每个虚拟主机选项,因此您可以基于每个应用程序自定义Ruby解释器。

For passenger 3 you would have to use proxies. 对于乘客3,您将必须使用代理。

对于3.x乘客:来自phusion的一种解决方案是使用mod_proxy绑定到独立乘客: http ://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/我不确定100%,但是在99%时,您无法加载两个版本的乘客模块,因为它们将对配置变量(例如,PassengerRoot,PassengerRuby)产生冲突,它们仅限于服务器范围

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM