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 22.214.171.124. And let’s say we want to create a new app with Rails version 126.96.36.199.
First, check the Rails version installed on our system
$ gem list "^rails$" *** LOCAL GEMS *** rails (188.8.131.52, 5.0.0, 4.2.6, 4.2.3, 4.2.1)
Since there is no 184.108.40.206 installed yet, we have to install with specific version (gem install
$ gem install rails -v 220.127.116.11
And generate a new Rails app using (
rails _version_ new application_name)
$ rails _18.104.22.168_ 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