Skip to content

Instantly share code, notes, and snippets.

@gshutler
Created December 9, 2011 11:22
Show Gist options
  • Save gshutler/1451163 to your computer and use it in GitHub Desktop.
Save gshutler/1451163 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "rubygems"
# Take a copy of the arguments as rubygems or bundler modifies them
args = ARGV.dup
begin
gem "bundler"
rescue Gem::LoadError
require "rubygems/dependency_installer"
installer = Gem::DependencyInstaller.new :document => []
installer.install "bundler"
end
require "bundler"
require "bundler/cli"
Bundler::CLI.new.invoke :install, [], :path => "managed_libs", :quiet => true
require "bundler/setup"
require "bozo"
# Assign the command line arguments back so Bozo can inspect them
ARGV.clear.push *args
Bozo.hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment