Tips using old version of rails

  03 Nov 2016

Sometime you want to launch older version of Rails, either to debug or see the issue that happens in specific version of Rails.

Here is the tips to generate new app with older Rails version. The latest Rails version is And let’s say we want to create a new app with Rails version

First, check the Rails version installed on our system

    $ gem list "^rails$"

    *** LOCAL GEMS ***

    rails (, 5.0.0, 4.2.6, 4.2.3, 4.2.1)

Since there is no installed yet, we have to install with specific version (gem install -v or --version)

    $ gem install rails -v

And generate a new Rails app using (rails _version_ new application_name)

    $ rails _4.1.14.1_ new myapp

Finally, we can verify gem versions that are used in the project by change into project directory and check Gemfile.lock file for rails version and bundle install

comments powered by Disqus