Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating Rails 3.0.3 to 3.0.5

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:

  1. Edited the Gemfile and change to 3.0.5
  2. bundle install

Then in the related gemset you see all rails 3.0.5 and 3.0.3 gems.

  1. Is this the usual way?
  2. Should I remove all 3.0.3 gems?
  3. Is there a better way to update a rails app?
like image 829
appsunited Avatar asked Mar 01 '11 18:03

appsunited


People also ask

What is the difference between rails 5 and rails 6?

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.


1 Answers

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.

like image 78
idlefingers Avatar answered Oct 03 '22 02:10

idlefingers