Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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 <michael@koziarski.com>
  • Loading branch information...
commit 7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef 1 parent 361aaa0
@jbarnette jbarnette authored NZKoz committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 railties/lib/initializer.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.