提交 7f4171da 编写于 作者: J John Barnette 提交者: Michael Koziarski

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: NMichael Koziarski <michael@koziarski.com>
上级 361aaa04
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册