This is merely for reference for anyone out there new to Rails or Ruby and trying to work with the Agile book. Version 2.0.2 of Rails is out now and it’s just way too difficult to follow along with the great AWDWR book from Pragmatic. To be successful with that book, you need to use Rails 1.2.3. Here’s how you do it:
If you have a brand new macbook pro, you’re done. It comes equipped with Rails 1.2.3. Start following along with the first Hello World program.
If you’ve accidentally installed Rails 2.0, you can start a Rails 1.2.3 project like this:
sudo gem update --system
sudo gem install rails -v=1.2.3
rails _1.2.3_ depot
where depot is the name of your project.
If you’ve got a Windows machine, start from scratch. Grab The one click ruby installer (Windows installer) and install it.
Next, open up a command prompt and install Rails 1.2.3, and Mongrel
gem update --system
gem install rails -v '1.2.3'
gem install mongrel
gem install mysql
Now just go ahead and follow along with the book. When you’re done, you can update to Rails 2.0 by doing
gem install rails
which will install the latest version of Rails. Your current Rails apps are tied to the version of Rails they are created on. You change the version of Rails the app uses by “freezing gems” (placing a copy of Rails in the app’s vendor/rails folder, or by editing the app’s config/environment.rb file and changing the version specified there. Do a web search for more info on this.
You can specify the version of Rails you want to use by passing it along on the commandline
rails _1.2.3_ old_rails_app
rails _1.2.6_ ready_to_update_app
rails _1.1.6_ legacy app
rails _2.0.2_ new_rails_app
Just make sure you have all of the Rails versions that you want to use on your machine.