Skip to content
This repository
Browse code

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

… in config/boot.rb
  • Loading branch information...
commit 0646c706e69eddc7e1ee213c65952967128aa545 1 parent d1b4f3b
Piotr Sarnacki authored December 17, 2010
13  railties/lib/rails/generators/rails/app/templates/config/boot.rb
... ...
@@ -1,13 +1,6 @@
1 1
 require 'rubygems'
2 2
 
3 3
 # Set up gems listed in the Gemfile.
4  
-gemfile = File.expand_path('../../Gemfile', __FILE__)
5  
-begin
6  
-  ENV['BUNDLE_GEMFILE'] ||= gemfile
7  
-  require 'bundler'
8  
-  Bundler.setup
9  
-rescue Bundler::GemNotFound => e
10  
-  STDERR.puts e.message
11  
-  STDERR.puts "Try running `bundle install`."
12  
-  exit!
13  
-end if File.exist?(gemfile)
  4
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
  5
+
  6
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

0 notes on commit 0646c70

Please sign in to comment.
Something went wrong with that request. Please try again.