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