From 1edb5c85b58653a6fdc73ae1c6c63e317b466b27 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 15 Jul 2008 15:50:37 -0700 Subject: Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise. --- railties/lib/initializer.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'railties/lib') 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 -- cgit v1.2.3