Can I install two different Rails versions on the same computer (without using a virtual machine)? I want to switch back and forth easily between Rails 1.2.3 and Rails 2.0.2. I assume that if I try to gem-install a second version, there will still be only one rails file in my ruby\bin directory. How to resolve the two versions? I’m alternately using the command line, RadRails, and 3rd Rail.
Can I install two different Rails versions on the same computer (without
using a virtual machine)? I want to switch back and forth easily between
Rails 1.2.3 and Rails 2.0.2. I assume that if I try to gem-install a
second version, there will still be only one rails file in my ruby\bin
directory. How to resolve the two versions? I'm alternately using the
command line, RadRails, and 3rd Rail.
As far as the app goes, just set the GEM version in environment.rb. For
the commandline tool, try renaming the rails binary to something else
such as rails2 and then install the other version of the gem.
* Several versions of the same gem can be installed without problem, RubyGems provides ways to refer to them if needed
* If Rails was frozen under vendor/rails that's the one used unconditionally, you can even run that application without a system-wide rails installed, it is self-contained in that sense
* Otherwise if RAILS_GEM_VERSION is uncommented in environtment.rb that specific version of the gem is the one loaded
* Otherwise the rails gem is loaded without a version constraint
Can I install two different Rails versions on
the same computer (without using a virtual
machine)? I want to switch back and forth
easily between Rails 1.2.3 and Rails 2.0.2.
In addition to the approaches suggested by other responders, if you're
running on Windows you should consider Instant Rails. I've found it to be
the least complicated, least error-prone solution to the problem you're
working.