Skip to content

Commit

Permalink
Only tell users that the Rails gem is missing if it's actually the ca…
Browse files Browse the repository at this point in the history
…se [#2901 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
David Trasbo authored and josevalim committed Jun 29, 2010
1 parent 69c4e4c commit d0d10f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions railties/environments/boot.rb
Expand Up @@ -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
Expand Down

0 comments on commit d0d10f5

Please sign in to comment.