Working with multiple versions of Rails

http://blog.fiveruns.com/2008/8/6/quickly-switching-between-different-rails-releases-with-git

1. Clone the whole Rails repository so you can switch versions offline

git clone git://github.com/rails/rails.git

2. Checkout desired version from local copy

cd /path/to/cloned/rails
git checkout v1.2.6

3. Create a skeleton rails app with the version of rails from the local repository

ruby /path/to/cloned/rails/railties/bin/rails skeleton-1.2.6

4.Copy the cloned rails to the skeleton app’s vendor directory

cp /path/to/cloned/rails skeleton-1.2.6/vendor/

Alternately, you can create skeleton apps with specific versions and freeze

rake rails:freeze:edge RELEASE=1.2.6

(Revision not set, using HEAD)

Or to create a project with a specific version of rails (with gem installed), use underscores around the version number :

ruby rails _1.2.5_ skeleton
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s