带rbenv乘客和导轨的登台服务器 [英] staging server with rbenv passenger and rails

查看:85
本文介绍了带rbenv乘客和导轨的登台服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个登台服务器,我想使其同时运行ruby1.8.7/Rails2和ruby1.9.3/Rails3应用程序. 该服务器已成功使用nginix rbenv ruby​​ 1.8.7乘客和rails 2进行了设置.现在我想将rails3应用程序与ruby1.9.3一起添加,但是我想知道我是否真的能做到这一点,因为我不得不告诉nginix哪个特定乘客在其nginx.conf中使用.此设置

I have a staging server and I'd like to make it run both ruby1.8.7/Rails2 and ruby1.9.3/Rails3 application. The server was successfully set up with nginix rbenv ruby 1.8.7 passenger and rails 2. Now I want to add the rails3 application along with ruby1.9.3 but I wonder if I really can do that as I had to tell nginix which particular passenger to use in its nginx.conf. This setting

passenger_root /home/rails_user/.rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/passenger-4.0.24;
passenger_ruby /home/rails_user/.rbenv/versions/1.8.7-p374/bin/ruby;

或这个:

#passenger_root /home/rails_user/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/passenger-4.0.24;
#passenger_ruby /home/rails_user/.rbenv/versions/1.9.3-p448/bin/ruby;

在添加ruby 1.9和rails3之后,我注意到如果使用第一个,则旧的1.8应用程序将继续运行,但不会运行新的应用程序.如果使用后一种配置,则会发生相反的情况. 在这一点上,我认为这是不可能的,或者至少不能以这种方式进行.我说的对吗?

After adding ruby 1.9 and my rails3 I notice that if I use the first one, my old 1.8 app keep running but not the new one. The opposite happened if I use the latter configuration. At this point it looks to me as it is not possible to get both working or at least not in this way. Am I right?

谢谢

推荐答案

目前,我设法继续前进:

For the moment I managed to move forward with:

passenger_root /home/rails_user/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/passenger-4.0.24;
passenger_ruby /home/rails_user/.rbenv/shims/ruby;

但是我不确定这是正确/最佳的解决方案.任何意见都会被接受,谢谢

but I'm not sure it is the right/best solution. Any opinion will be well-accepted thanks

这篇关于带rbenv乘客和导轨的登台服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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