Hi All,
I’ve got a few versions or Rails installed and I'd like to run an App I’m developing with various versions of Rails. I heard of two ways to switch the version of Rails that an app uses:
1. Use GitHub as described by Getting Started with Git and GitHub on Windows – Kyle Cordes . But that requires using Bash in a Command Window and more steps than I want to go through.
2. Alter environment.rb with one line to specify the desired version. That sounds like my kind of solution, except I can’t make it work.
My problem is that when I specify one of my installed versions, the Mongrel trace informs me that my specified Rails version is not being used, nor is the version that “rails –v” reports. Is there an easy way to get this mechanism working? Following are the gory details.
Thanks in Advance, Richard
A. = = = = = = = = = = = = = = = = = = = = = = = = Environment:
I’m running WinXP-Pro/SP3 with all the Windows updates, plus Ruby & Rails software as indicated below:
K:\>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
K:\>rails -v Rails 2.2.1
K:\>gem list rails -l
*** LOCAL GEMS ***
rails (2.2.1, 2.2.0, 2.1.2, 2.0.2, 1.1.6, 1.1.4) rails-app-installer (0.2.0)
B. = = = = = = = = = = = = = = = = = = = = = = = = I modified config\environment.rb by commenting out “RAILS_GEM_VERSION = '2.2.0' unless defined? RAILS_GEM_VERSION” and followed it with the following 6 lines:
RAILS_GEM_VERSION = '2.0.2' # RLM puts "\n=============" # RLM puts "RAILS_GEM_VERSION is defined" if defined? RAILS_GEM_VERSION # RLM puts "RAILS_GEM_VERSION:" # RLM puts "#{RAILS_GEM_VERSION}" # RLM puts "=============\n\n" # RLM
C. = = = = = = = = = = = = = = = = = = = = = = = = I started Mongrel 1.1.4 and got, as expected, in the Command Window from which it was launched: