From: Alex LeDonne Date: 2007-11-10T03:52:27+09:00 Subject: Re: LoadError: no such file to load On Nov 8, 2007 2:59 PM, Peter Hug wrote: > Axel Etzold wrote: > > require "rubygems" > > require "json" > > Spot on Axel, that fixed it! Thanks heaps. > > What puzzles me though is that the same setup works fine under Windows > (i.e. my ruby scripts can use any installed gems without having to load > rubygems first. > > Any idea why that would be? > > > Pete The Ruby One-Click Installer sets an environment variable calld RUBYOPT to -rubygems, which causes ruby to automatically require 'rubygems' for you. You could set RUBYOPT on your Ubuntu box, if you like. -A