One tip to upgrade your Rails is by running Gem to get the latest release. You can do this using:
• gem update rails -y
• sudo gem update rails -y
If you are planning to upgrade your existing projects in Rails, you can try the following method:
• Open your_project/config/environment.rb and change RAILS_GEM_VERSION to determine the version you just upgraded to.
• Check to make sure that any tests you may have written still pass.
Also remember to use gem cleanup to remove older versions of rails.