Skip to content

Commit

Permalink
Use require 'bundler/setup' instead of directly calling Bundler.setup…
Browse files Browse the repository at this point in the history
… in config/boot.rb
  • Loading branch information
drogus committed Dec 17, 2010
1 parent 07567ae commit e22885f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions railties/lib/rails/generators/rails/app/templates/config/boot.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,13 +1,6 @@
require 'rubygems' require 'rubygems'


# Set up gems listed in the Gemfile. # Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] ||= gemfile require 'bundler/setup' if File.exists?(ENV['BUNDLE_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)

0 comments on commit e22885f

Please sign in to comment.