开发者

Updating Rails 3.0.3 to 3.0.5

开发者 https://www.devze.com 2023-02-14 00:31 出处:网络
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.

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 tri开发者_JAVA技巧ed 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?


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.


this is a good guide - http://railsapps.github.com/updating-rails.html .....


Just execute: gem update rails

You should not remove 3.0.3 gems.

0

精彩评论

暂无评论...
验证码 换一张
取 消