From 7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef Mon Sep 17 00:00:00 2001 From: John Barnette Date: Fri, 25 Apr 2008 22:34:39 -0700 Subject: [PATCH] Be friendlier when upgrading apps with an old boot.rb. If Rails doesn't respond to vendor_rails?, abort with an error asking the user to run 'rake rails:update'. Signed-Off-By: Michael Koziarski --- railties/lib/initializer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index b5bf9266f5175..e36f917b15be0 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -160,6 +160,10 @@ def check_ruby_version # ActiveResource. This allows Gem plugins to depend on Rails even when # the Gem version of Rails shouldn't be loaded. def install_gem_spec_stubs + unless Rails.respond_to?(:vendor_rails?) + abort "Your config/boot.rb is outdated: Run 'rake rails:update'." + end + if Rails.vendor_rails? begin; require "rubygems"; rescue LoadError; return; end