Phusion Passenger with Ruby 1.8 and 1.9?

2020-06-16 03:31发布

问题:

How would I go about running two separate Rails applications using Phusion Passenger with one using Ruby 1.8.x and the other using Ruby 1.9.x ? I'm running Redmine which isn't Ruby 1.9.x compatible, and the other application is a home grown app.

I'm using Apache 2.2.x with Passenger 2.2.4.

Is this even possible ?

回答1:

I ended up running Nginx with Passenger and Ruby 1.9 on port 80, and then proxying off my other virtual hosts to Apache 2.2 on port 8080 with Passenger and Ruby 1.8. Win!



回答2:

Just a little late but I found this thanks to Google: Phusion Passenger & running multiple Ruby versions Must be the necromancer in me.



回答3:

Use the PassengerRuby directive.



回答4:

Passenger supports multiple Ruby interpreters as of version 4.0.0 (February 2013). The PassengerRuby config option has been made a per-virtual host option, so you can customize your Ruby interpreter on a per-application basis. See here for details.