问题
I've been running both Ruby 1.8.7 and Ruby 1.9 for a few weeks now. I install Ruby 1.9 with the suffix 19, so that the interpreter, rake, gem, etc. commands are "ruby19", "irb19", "rake19", "gem19", etc. The 1.8.7 equivalents have no suffix and are thus defaults.
I figure that's the simplest and most transparent way to manage two versions of Ruby. I can just change the #! line of my Ruby scripts to use one version or the other.
I've read about fancier solutions that involve altering symlinks on the fly, or a full-blown solution like rvm. But I prefer the simple and transparent approach. I just wonder if there are any serious drawbacks with it.
回答1:
rvm rocks! give it a chance. "full-blown solution" does not mean complicated. It works really well for switching ruby versions.
来源:https://stackoverflow.com/questions/2179959/best-practice-for-installing-multiple-versions-of-ruby-apart-from-rvm