aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames McKinney <james@slashpoundbang.com>2011-10-11 14:38:03 -0400
committerJames McKinney <james@slashpoundbang.com>2011-10-11 14:38:03 -0400
commit0e87f14aeef681477e3e594b8bf0c9d3740cdc1c (patch)
tree937c1fd06ad65a9233a5fe924aea8c1661f7b0ac
parent19d15135c27d04bb822cc667fddc6305a7d3359c (diff)
Add a more correct check for vendored Rails, and use non-vendored Rails' gem_dependency.rb if not vendored
-rw-r--r--config/boot.rb2
-rw-r--r--lib/old_rubygems_patch.rb6
2 files changed, 6 insertions, 2 deletions
diff --git a/config/boot.rb b/config/boot.rb
index 90fd9cd4d..0f5e661ed 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -31,7 +31,7 @@ module Rails
end
def vendor_rails?
- File.exist?("#{RAILS_ROOT}/vendor/rails")
+ File.exist?("#{RAILS_ROOT}/vendor/rails/Rakefile")
end
def preinitialize
diff --git a/lib/old_rubygems_patch.rb b/lib/old_rubygems_patch.rb
index 5601a5e90..3001a7381 100644
--- a/lib/old_rubygems_patch.rb
+++ b/lib/old_rubygems_patch.rb
@@ -1,4 +1,8 @@
-require File.join(File.dirname(__FILE__),'..','vendor','rails','railties','lib','rails','gem_dependency.rb')
+if File.exist? File.join(File.dirname(__FILE__),'..','vendor','rails','railties','lib','rails','gem_dependency.rb')
+ require File.join(File.dirname(__FILE__),'..','vendor','rails','railties','lib','rails','gem_dependency.rb')
+else
+ require 'rails/gem_dependency'
+end
module Rails
class GemDependency < Gem::Dependency