Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only tell users that the Rails gem is missing if it's actually the ca…

…se [#2901 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit d0d10f51d7b2edea94a00291d79cad769d8a6470 1 parent 69c4e4c
@dtrasbo dtrasbo authored josevalim committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/environments/boot.rb
View
8 railties/environments/boot.rb
@@ -62,8 +62,12 @@ def load_rails_gem
gem 'rails'
end
rescue Gem::LoadError => load_error
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
- exit 1
+ if load_error.message =~ /Could not find RubyGem rails/
+ STDERR.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
+ exit 1
+ else
+ raise
+ end
end
class << self
Please sign in to comment.
Something went wrong with that request. Please try again.