Created
January 1, 2010 16:57
-
-
Save lifo/267160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/railties/lib/rails/generators/rails/app/templates/config/boot.rb b/railties/lib/rails/generators/rails/app/templates/config/boot.rb | |
index 6de1725..0240289 100644 | |
--- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb | |
+++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb | |
@@ -6,11 +6,18 @@ if File.exist?("#{environment}.rb") | |
# Use 2.x style vendor/rails and RubyGems | |
else | |
vendor_rails = File.expand_path('../../vendor/rails', __FILE__) | |
- if File.exist?(vendor_rails) | |
- Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } | |
- end | |
- require 'rubygems' | |
+ bundler_env = File.join(vendor_rails, "vendor/gems/environment.rb") | |
+ | |
+ if File.exist?(bundler_env) | |
+ require bundler_env | |
+ else | |
+ if File.exist?(vendor_rails) | |
+ Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } | |
+ end | |
+ | |
+ require 'rubygems' | |
+ end | |
end | |
require 'rails/all' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment