staging server with rbenv passenger and rails

风格不统一 提交于 2019-12-13 02:18:36

问题


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;

or this one:

#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;

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?

thanks


回答1:


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



来源:https://stackoverflow.com/questions/20078951/staging-server-with-rbenv-passenger-and-rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!