aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorLeslie Viljoen <leslieviljoen@gmail.com>2016-02-12 09:52:20 +1300
committerLeslie Viljoen <leslieviljoen@gmail.com>2016-02-12 09:52:20 +1300
commit4097ed5586ca23551d7f1fa3dbde4f5c86fa36ae (patch)
tree067970e880e6a5d07366eebc38c8dd57c04281c4 /guides/source/upgrading_ruby_on_rails.md
parent0912579b1cc2832d4a389a5021d9dc6727d16f77 (diff)
downloadrails-4097ed5586ca23551d7f1fa3dbde4f5c86fa36ae.tar.gz
rails-4097ed5586ca23551d7f1fa3dbde4f5c86fa36ae.tar.bz2
rails-4097ed5586ca23551d7f1fa3dbde4f5c86fa36ae.zip
Document the upgrade process
The iterative process one has to follow is not currently documented, and people could be unfamiliar with the Rails versioning scheme, causing them to skip versions or upgrade to patch releases. [ci skip]
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index e631445492..515b3ee7a3 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -16,6 +16,21 @@ Before attempting to upgrade an existing application, you should be sure you hav
The best way to be sure that your application still works after upgrading is to have good test coverage before you start the process. If you don't have automated tests that exercise the bulk of your application, you'll need to spend time manually exercising all the parts that have changed. In the case of a Rails upgrade, that will mean every single piece of functionality in the application. Do yourself a favor and make sure your test coverage is good _before_ you start an upgrade.
+### The Upgrade Process
+
+When changing Rails versions, it's best to move slowly, one minor version at a time, in order to make good use of the deprecation warnings. Rails version numbers are in the form Major.Minor.Patch. Major and Minor versions change the API which means you will probably need to change your code. Patch versions are just bug fixes that don't change the API.
+
+The process should go as follows:
+
+1. Write tests and make sure they pass
+1. Move to the latest patch version after your current version
+1. Fix tests and deprecated features
+1. Move to the latest patch version of the next minor version
+
+Repeat this process until you reach your target Rails version. Each time you move versions, you will need to change the Rails version number in the Gemfile (and possibly other Gem versions) and run `bundle update`. Then run the Update rake task mentioned below to update configuration files, then run your tests.
+
+You can find a list of all the Rails Gem versions [here](https://rubygems.org/gems/rails/versions).
+
### Ruby Versions
Rails generally stays close to the latest released Ruby version when it's released: