Categories
Programming

How to Install an Older Version of Rails

Learned something on the Rails-talk list today that blew me away.

You can install an older version of rails using this syntax:

rails _4.0.8_ new appname

(Where “4.0.8” is the version you want and “appname” is the name of your new rails app.)

Yes, you actually type those underscores around the version number. By the way, if you don’t have that version installed (it installs via bundler), bundler will tell you it can’t find the gem. In that case, you’ll want to do gem install rails -v 4.0.8 and then re-run the command above.

This is a :thumbs down: for Rails documentation. This little trick isn’t even documented when I get the manual page for the rails new command (rails new -h)

Voila!

Leave a Reply

OR LOG IN WITH




Your email address will not be published. Required fields are marked *