From f46c2d2d29bd6cd104fbb39d1cfc154958ef21ae Mon Sep 17 00:00:00 2001 From: Samuel Kadolph Date: Fri, 17 Dec 2010 14:39:06 -0500 Subject: [PATCH] Allow ENV['BUNDLE_GEMFILE'] to override default Gemfile location and be able to delete the default Gemfile [#6184 state:resolved] --- .../generators/rails/app/templates/config/boot.rb | 5 ++--- 1 files changed, 2 insertions(+), 3 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 f7b36a1..1f9a0f7 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,12 @@ require 'rubygems' # 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' Bundler.setup rescue Bundler::GemNotFound => e STDERR.puts e.message STDERR.puts "Try running `bundle install`." exit! -end if File.exist?(gemfile) +end if File.exist?(ENV['BUNDLE_GEMFILE']) -- 1.7.0.4