Updating rails versions on big apps can be dangerous and time consuming. This is the workflow we use to deploy and test our Rails upgrades in isolation, before releasing them to everybody and without blocking other changes.
ln -s Gemfile Gemfile.rails4 and use
BUNDLE_GEMFILE=Gemfile.rails4 bundle exec rails c to run rails 4.
if ENV['BUNDLE_GEMFILE'].to_s.include?('rails4') gem "rails", "4.0.13"