Sometimes you need to make a script for someone but you are not sure what he has on his machine. Is there everything that your script needs? Not to worry. Bundler has a great function called in line.
It provides a
gemfile method and before the script is run it downloads and requires all the necessary gems. A little example:
require 'bundler/inline' #require only what you need #Start the bundler and in it use the syntax you are already familiar with gemfile(true) do source 'https://rubygems.org' gem 'nokogiri', '~> 184.108.40.206' gem 'ruby-graphviz' end