Created
June 4, 2020 07:26
-
-
Save almokhtarbr/800d25ec0153d00e46907c4e147b3046 to your computer and use it in GitHub Desktop.
updating rails app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Upgrade Rails and gems | |
Update your Gemfile. Temporarily, set an exact Rails version, (e.g. gem 'rails', '= 5.2.1'). | |
Run bundle update. | |
Relax the Rails version in your Gemfile again (e.g. gem 'rails', '~> 5.2.1'). | |
Run bundle install. | |
Update your Rails config | |
Run rails app:update. This will try to write all configuration like it would for a new Rails app, and show you the diff to your current code. | |
Check the official Rails upgrade guide | |
Rails has official upgrade notes. Read through the relevant sections and make the appropriate changes. | |
Get rails console running | |
Fix all errors until the Rails console does not crash while starting up. | |
Ignore deprecation warnings for now. | |
Get rails console running with eager loading | |
Enable config.eager_load = true in development.rb. | |
Fix all errors until the Rails console does not crash while starting up. | |
Disable eager loading again. | |
Get rails server running | |
Fix all errors until rails server can render a page. | |
Click around a bit. Fix all errors you can find. | |
Fix tests | |
Fix unit tests. | |
Fix integration tests. | |
Fix deprecation warnings. | |
Run your tests and fix all deprecation warnings. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment