diff options
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/boot.rb | 18 |
1 files changed, 8 insertions, 10 deletions
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 44c884623e..2c527b4a4a 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb @@ -1,17 +1,15 @@ -# Package management -# Choose one - +# Use Bundler (preferred) environment = File.expand_path('../../vendor/gems/environment', __FILE__) -vendor_rails = File.expand_path('../../vendor/rails', __FILE__) - if File.exist?(environment) - # Use Bundler (preferred) require environment -elsif File.exist?(vendor_rails) - # Use 2.x style vendor/rails directory - Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } + +# Use 2.x style vendor/rails and RubyGems else - # Load Rails from traditional RubyGems + vendor_rails = File.expand_path('../../vendor/rails', __FILE__) + if File.exist?(vendor_rails) + Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } + end + require 'rubygems' end |