On Jul 18, 2008, at 12:13 PM, Rob Mauchel wrote: > I have a Ruby script which runs fine on my own machine that I'd like > to > setup a Cronjob for to run on my web space provider's server. The > latter > has been setup so that a number of "system" gems are pre-installed for > all users in a global gem respository. Any additional gems a user > might > require must be installed by that user using the provider's CPanel > RubyGem utility, which places such gems into a second, local, user > specific, gem repository. > > For test purposes, I created a script that simply 'requires' two > gems - > the first global and the second local - with a print statement before > and after. > > Initially, I got an error on the first require statement and > determined > that the reason was because the RUBYOPT environment variable was not > set > to -rubygems, as it is on my own machine. > > After ensuring that option was specified, I then got an error on the > second require statement and determined that the reason was because > the > GEM_PATH environment variable was not set to my local (i.e. second) > respository. > > After ensuring that environment variable was set, I no longer got an > error, but I also didn't get any output from the print statement > following the two requires. > > Taking this to mean that the local gem was not successfully loading, I > tried adding appending the path to my local gem repository's bin > folder > to the PATH environment variable, but this didn't help any. Set GEM_HOME to be the user repository, and have the user repository come first in GEM_PATH.