diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-15 15:50:37 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-15 15:50:37 -0700 |
commit | 1edb5c85b58653a6fdc73ae1c6c63e317b466b27 (patch) | |
tree | d55c7a757e67ab1bcbe6dd92a8a6c8d94a9ace2c /railties | |
parent | b337ab0221085ab1a941d87f06eb4904b5852c82 (diff) | |
download | rails-1edb5c85b58653a6fdc73ae1c6c63e317b466b27.tar.gz rails-1edb5c85b58653a6fdc73ae1c6c63e317b466b27.tar.bz2 rails-1edb5c85b58653a6fdc73ae1c6c63e317b466b27.zip |
Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 18bcf69d69..7808d88d92 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -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 |