利用乘客同时运行的Rails 3.0和Rails 3.1的应用程序(使用不同的RVM gemsets) [英] Using passenger to run both Rails 3.0 and Rails 3.1 app (using different rvm gemsets)

查看:189
本文介绍了利用乘客同时运行的Rails 3.0和Rails 3.1的应用程序(使用不同的RVM gemsets)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是跟着这些路线安装新RVM宝石和安装导轨-3.1.0 .RC2我的本地机器上。起初我得到一个错误乘客称耙0.9.2宝石无法加载,但我发现提醒我跑$客车安装-Apache2的模块。安装它精细促使我下面添加到我的Apache的配置文件(/etc/apache2/httpd.conf):

I just followed these directions for installing a new rvm gemset and installing rails-3.1.0.rc2 on my local machine. At first I was getting a Passenger error saying the rake-0.9.2 gem could not be loaded, but I found this reminding me to run "$ passenger-install-apache2-module". It installed fine prompted me to add the following to my Apache config file (/etc/apache2/httpd.conf):

LoadModule passenger_module /Users/robs/.rvm/gems/ruby-1.9.2-p180@rails-3.1/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /Users/robs/.rvm/gems/ruby-1.9.2-p180@rails-3.1/gems/passenger-3.0.7
PassengerRuby /Users/robs/.rvm/wrappers/ruby-1.9.2-p180@rails-3.1/ruby

不过,目前已经有三条线有从不同的宝石:

However, there are already three lines there from a different gemset:

LoadModule passenger_module /Users/robs/.rvm/gems/ruby-1.9.2-p180@rails-3.0/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /Users/robs/.rvm/gems/ruby-1.9.2-p180@rails-3.0/gems/passenger-3.0.7
PassengerRuby /Users/robs/.rvm/wrappers/ruby-1.9.2-p180@rails-3.0/ruby

如果我离开这两个套系有注释掉(中@轨-3.1宝石的是最后一个),并重新启动Apache,我的Rails应用程序3.0将不会启动。我发现自己不得不注释掉轨3.1宝石线,重新启动Apache,然后运行$ RVM使用ruby-1.9.2-p180@rails.3.0。如果我想运行Rails的3.1应用程序,我需要做的是相反的。

If I leave both sets of lines there uncommented (the @rails-3.1 gemset's is last), and restart Apache, my Rails 3.0 app won't start. I find myself having to comment out the rails 3.1 gemset lines, restart Apache, and then run "$ rvm use ruby-1.9.2-p180@rails.3.0". If I want to run the Rails 3.1 app, I have to do the opposite.

有没有办法同时拥有能够在同一时间没有这些额外的步骤来运行?

Is there a way to have both be able to run at the same time without these extra steps?

推荐答案

这篇文章可能对您有用。

我用它作为一个例子来建立自己的开发环境,nginx的。

I used it as an example to setup my own development environment with nginx.

这篇关于利用乘客同时运行的Rails 3.0和Rails 3.1的应用程序(使用不同的RVM gemsets)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆