Permalink
Browse files

Use require 'bundler/setup' instead of directly calling Bundler.setup…

… in config/boot.rb
  • Loading branch information...
1 parent d1b4f3b commit 0646c706e69eddc7e1ee213c65952967128aa545 @drogus drogus committed Dec 17, 2010
Showing with 3 additions and 10 deletions.
  1. +3 −10 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'])

0 comments on commit 0646c70

Please sign in to comment.