Permalink
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...
1 parent 69c4e4c commit d0d10f51d7b2edea94a00291d79cad769d8a6470 @dtrasbo dtrasbo committed with josevalim Jun 29, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 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

0 comments on commit d0d10f5

Please sign in to comment.