Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created August 25, 2011 19:25
Show Gist options
  • Save rramsden/1171563 to your computer and use it in GitHub Desktop.
Save rramsden/1171563 to your computer and use it in GitHub Desktop.
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment