diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-17 19:29:33 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-12-17 20:30:34 +0100 |
commit | e22885f3a9476990c07235512f5579740eec059b (patch) | |
tree | 3f6f8821fd85a720ce7c16b03145c0e250b854f5 /railties/lib/rails/generators | |
parent | 07567aea5f0c6f14a53f511ab4cc46201b669795 (diff) | |
download | rails-e22885f3a9476990c07235512f5579740eec059b.tar.gz rails-e22885f3a9476990c07235512f5579740eec059b.tar.bz2 rails-e22885f3a9476990c07235512f5579740eec059b.zip |
Use require 'bundler/setup' instead of directly calling Bundler.setup in config/boot.rb
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/boot.rb | 13 |
1 files changed, 3 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 f7b36a13da..4489e58688 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb @@ -1,13 +1,6 @@ require 'rubygems' # Set up gems listed in the Gemfile. -gemfile = File.expand_path('../../Gemfile', __FILE__) -begin - ENV['BUNDLE_GEMFILE'] ||= gemfile - require 'bundler' - Bundler.setup -rescue Bundler::GemNotFound => e - STDERR.puts e.message - STDERR.puts "Try running `bundle install`." - exit! -end if File.exist?(gemfile) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) |