###Short answer:
The instructions are out of date, but there is no sufficiently significant difference between 4.2.5 and 4.2.6 to worry about it.
Either do bundle update (which should make everything able to use 4.2.5), or (as you figured) revert to the original specification you found in your Gemfile (ie, change the line back to gem 'rails', '4.2.6')
###Slightly longer answer:
####Gemfile and Gemfile.lock
Your Gemfile describes which gems your app needs to run (its "dependencies"), and which versions of those gems are acceptable.
For each gem you include, you can specify no version (any version is acceptable), a specific version (only this version is acceptable), or a range of versions (anything after this version / between these versions is acceptable).
The Bundler system reads your Gemfile, attempts to install versions of those gems that fit within the rules you've defined, installs all those gems' own dependencies based on the rules in their Gemfiles (and all those gems' dependencies, etc, recursively), and then writes the solution it found for resolving all these rules (the names and versions of all the gems that it's installed, and that you're using when you run the program) down in Gemfile.lock.
Gemfile.lock is intended to be a record of "the versions I know for a fact that everything in my app works with".
####bundle install vs bundle update
-
bundle installtries to be very conservative, and to not allow you to accidentally update anything that was previously working just fine (which it has a record of, ingemfile.lock), as a side effect of updating something else.As a result, sometimes it will fail, with a warning that effectively means that it can't update one gem without also updating another gem. Specifically, that there are two gems which, in their own dependencies, would require different versions of the same gem -- but only one version can be active at a time.
This failure is by design. See
bundle's Recommended Workflow -
bundle updatejust gets the newest version of everything it can find, while still remaining within the versioning rules defined in your project'sGemfile, and all your gems'Gemfiles, etc.
Also see: The specific differences between 4.2.5 and 4.2.6 (a handful of relatively minor bugfixes for ActionView and ActiveRecord), and Rails' versioning policy in general