I don't have any experience in updating a Rails app and when I google it, it shows only complex ways how to update Rails 2.x to 3.0.x. So my issue is a bit simpler.
So far I tried this:
Then in the related gemset you see all rails 3.0.5 and 3.0.3 gems.
Rails 6 upgradation from Rails 5 And your current app rails version has latest patch version before moving to the next major/minor version. Rails 6 require Ruby version 2.5 or greater. You need to check all your gems from Gemfile are compatible with Rails 6 gem.
Yes, updating the Gemfile and running bundle install is the right way to update an app. gem update rails
will just install the new gem to your system (the same as bundler will do).
Though not needed for an update from 3.0.3 to 3.0.5, you should be aware of rake rails:update
, when updating Rails apps. It's useful if you haven't been keeping an eye on what configuration changes may have happened and are updating an app up a number of versions.
This will help you to find out if there are any things which need changing in the boot and environment files which are in the app, but can be ignored if you prefer to just deal with any deprecation warnings you see in the logs instead. Unless you want to do a lot of reverting in your scm, I'd recommend to press 'd' (for diff) each time it says there's a conflict and then just have a scan through to see if anything has changed and needs updating.
With regards to what to do with the old gem. It's completely up to you. Keep them if you want, uninstall them if you don't. It'll work fine either way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With