Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… in config/boot.rb
  • Loading branch information...
commit e22885f3a9476990c07235512f5579740eec059b 1 parent 07567ae
@drogus drogus authored
Showing with 3 additions and 10 deletions.
  1. +3 −10 railties/lib/rails/generators/rails/app/templates/config/boot.rb
View
13 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'])
Please sign in to comment.
Something went wrong with that request. Please try again.