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 tri开发者_JAVA技巧ed this:
- Edited the Gemfile and change to 3.0.5
- bundle install
Then in the related gemset you see all rails 3.0.5 and 3.0.3 gems.
- Is this the usual way?
- Should I remove all 3.0.3 gems?
- 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.
精彩评论