Skip to content

Instantly share code, notes, and snippets.

@sha1sum
Created June 29, 2016 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sha1sum/3a15a0bc2ff4562e0a44495679fd055f to your computer and use it in GitHub Desktop.
Save sha1sum/3a15a0bc2ff4562e0a44495679fd055f to your computer and use it in GitHub Desktop.
require 'fileutils'
# Install the 'facter' gem if not already installed. Facter assists in automatically determining the RAM and CPUs
# to use for the VM.
facter_plugins = `vagrant plugin list | grep facter`.tr("\n","")
unless facter_plugins.length > 0
puts "The 'facter' gem is not yet installed; installing..."
system 'vagrant', 'plugin', 'install', 'facter'
end
require 'rubygems'
require 'facter' # Message: LoadError: cannot load such file -- facter
# ... more code ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment