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