Browse files

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 <>
  • Loading branch information...
1 parent 361aaa0 commit 7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef @jbarnette jbarnette committed with NZKoz Apr 26, 2008
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 7f4171d

Please sign in to comment.