Shad Sterling
3/18/2005 6:31:00 PM
On Sat, 19 Mar 2005 02:59:52 +0900, andreas.cahen@gmail.com
<andreas.cahen@gmail.com> wrote:
>
> Robert Klemme wrote:
> >
> > You probably should set $LOAD_PATH explicitely in the script. Try
> > ruby -e 'p $LOAD_PATH'
> > and see what it prints from the command line and from cron.
> >
>
> Shell: 375 Bytes
> Cron: 159 Bytes
>
> I get a huge difference between executing this command on the shell and
> as cronjob.. how comes?
>
> How do I set the $LOAD_PATH? I tried to set it inside my ruby script
> but I summoned an error..
>
> Cheers,
>
> -Andreas
>
>
I've had problems with paths in cronjobs even just running shell
scripts. What I recall mostly is that the current directory was
something useless, and "~" was not the home directory. I made
everything work by using all absolute pathes. I don't think that
would be desirable for a require statement, but I expect it would make
it work.
(I don't actually know how require finds the files; I'm guessing
that's what $LOAD_PATH is for?)
- Shad
--
----------
Please do not send personal (non-list-related) mail to this address.
Personal mail should be sent to polyergic@sterfish.com.