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.

I'm not sure what else to try at this point.

Does anyone have any suggestions.

Any assistance you could provide would be much appreciated! :-)
-- 
Posted via http://www.ruby-forum.com/.