Does using passenger defeat the purpose of using RVM?
From what I can tell, P开发者_StackOverflow中文版assenger can only be configured to use one version of Ruby. So being able to easily switch between versions of Ruby with RVM is kinda pointless since Passenger has to to be reconfigured each time you want to switch versions of Ruby. Am I understanding this correctly?
True, Apache/Passenger only allows one Ruby interpreter to be used at a time. You could get around this by installing multiple copies of Apache, one for each of the Ruby versions that you will end up deploying to. You could then set up reverse proxies in your main Apache to all your other servers running on different ports.
You can also use "passenger start" in your app directories, but this has all the same limitations of "rails s" or "./script/server" etc.
I don't think so necessarily. I guess it depends on how often you need to switch your Ruby, since most of my projects use REE 1.8.7, I don't find myself needing to switch often. As for configuring Passenger, the offender that needs to be updated when swapping is in the httpd.conf of Apache - the lines you're instructed to put in on the initial install - as they reference a specific version path as you know.
In addition, I just find installing Ruby via RVM just more simple than installing it normally, even if it isn't swapped often.
If you never want to switch version of ruby then sure that might be fine. But realistically, you'll be changing versions. Plus, the benefits of using rvm far outweigh the cost (It's very easy to use so not much of a cost there)
精彩评论