Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
jbarnette authored and NZKoz committed Apr 27, 2008
1 parent 361aaa0 commit 7f4171d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions railties/lib/initializer.rb
Expand Up @@ -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

Expand Down

0 comments on commit 7f4171d

Please sign in to comment.