Permalink
Browse files

Squash backtraces from Bundler.setup

  • Loading branch information...
1 parent 961aa70 commit b73177a0954aed11543f2bb829cd07cc12d4f590 @indirect indirect committed with wycats Apr 21, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/lib/rails/generators/rails/app/templates/config/boot.rb
@@ -2,8 +2,12 @@
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
-if File.exist?(gemfile)
+begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
-end
+rescue Bundler::GemNotFound => e
+ STDERR.puts e.message
+ STDERR.puts "Try running `bundle install`."
+ exit!
+end if File.exist?(gemfile)

0 comments on commit b73177a

Please sign in to comment.