bogdanrada
6/2/2016 - 6:03 PM

gistfile1.rb

#!/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