Skip to content

Instantly share code, notes, and snippets.

@dagi3d
Created August 24, 2010 13:51
Show Gist options
  • Save dagi3d/547585 to your computer and use it in GitHub Desktop.
Save dagi3d/547585 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment