1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise.

This commit is contained in:
Jeremy Kemper 2008-07-15 15:50:37 -07:00
parent b337ab0221
commit 1edb5c85b5

View file

@ -266,11 +266,16 @@ module Rails
@gems_dependencies_loaded = false
# don't print if the gems rake tasks are being run
unless $rails_gem_installer
puts %{These gems that this application depends on are missing:}
unloaded_gems.each do |gem|
puts " - #{gem.name}"
end
puts %{Run "rake gems:install" to install them.}
abort <<-end_error
Missing these required gems:
#{unloaded_gems.map { |gem| "#{gem.name} #{gem.requirement}" } * "\n "}
You're running:
ruby #{Gem.ruby_version} at #{Gem.ruby}
rubygems #{Gem::RubyGemsVersion} at #{Gem.path * ', '}
Run `rake gems:install` to install the missing gems.
end_error
end
else
@gems_dependencies_loaded = true