diff options
author | John Barnette <jbarnette@gmail.com> | 2008-04-25 22:34:39 -0700 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-04-28 09:16:13 +1200 |
commit | 7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef (patch) | |
tree | 7c7a2a72280c22e9bfbb1842b760df32e358ace8 /railties | |
parent | 361aaa04ef2f33cb1fe49497c73bc13e6b72addc (diff) | |
download | rails-7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef.tar.gz rails-7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef.tar.bz2 rails-7f4171da5e3ed5b3e038b95f8f5ae05ba6e21bef.zip |
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>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index b5bf9266f5..e36f917b15 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -160,6 +160,10 @@ module Rails # 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 |