Mark Kirby

How to downgrade Ruby on Rails

I’m learning to use Ruby on Rails at the moment on weekends and after work for a project I’m working on for a friend. The problem is, I’m learning using the book Agile Web Development for Rails, which is written for Rails version 1, and I’ve installed Rails version 2 on my Mac.

The solution is to roll back, and downgrade Rails to a previous version.

Open up terminal

First check the exact version of Rails you are using

rails -v

Uninstall that version, for example, mine is 2.0.2

sudo gem uninstall -v 2.0.2 rails

Then install the previous version you want. I want the last release of version 1, thats 1.2.6

sudo gem install rails -v 1.2.6

–include-dependencies

Now I check again to be sure the correct version is installed

rails -v

If you need to use pagination, and to follow through with Agile Web Development for Rails you will, use:

# Note: you’ll need to have Subversion installed
ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination
ruby script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

Tags:

Leave a Reply

This site was created with Wordpress, using my own template.