require rubygems before puppet in case it is a gem
use "#!/usr/bin/env ruby" for better rvm compatibility