Rails Upgrading a project

When changing Rails versions, it's best to move slowly, one minor version at a time

The process should go as follows:

  1. Write tests and make sure they pass.
  2. Move to the latest patch version after your current version.
  3. Fix tests and deprecated features.
  4. Move to the latest patch version of the next minor version.

Repeat this process until you reach your target Rails version

  • Rails 6 requires Ruby 2.5.0 or newer.
  • Rails 5 requires Ruby 2.2.2 or newer.
  • Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
  • Rails 3.2.x is the last branch to support Ruby 1.8.7.
  • Rails 3 and above require Ruby 1.8.7 or higher. Support for all of the previous Ruby versions has been dropped officially. You should upgrade as early as possible.

 

Rails provides the app:update command (rake rails:update on 4.2 and earlier). After updating the Rails version in the Gemfile, run this command. This will help you with the creation of new files and changes of old files in an interactive session.

 

Comments

Popular posts from this blog

Rails Kaminari - Ajax pagination

Rails mongoid has field model validation