Specify rails 4 so it does not include rails 4.1 in Gemfile_rails40.

Rails 4.1 was getting loaded by bundler during the tests. Rails 4.1 includes minitest 5 which is incompatible with our tests and was breaking them since its release.