Updated for changes in yosemite, changes in RVM, Changes in Nokogiri and set proper permissions in linux.