If you have coded some ruby you would have seen the LoadError : 'require': no such file to load -- rubygems (LoadError) in case of the required gem is missing (not installed) or the gem path is screwed up!
Here is a simple silly old trick :
12345678
aliasold_requirerequiredefload_gem(gem)old_requiregemrescueLoadError=>eprint"'#{gem}' can't be found, trying to install it..."system("gem install #{gem} --no-ri --no-rdoc");Gem.clear_paths()&&require(gem)&&puts("loading '#{gem}' ok!")end