From: | Hans de Graaff <graaff@g.o> | ||
---|---|---|---|
To: | gentoo-user@l.g.o | ||
Subject: | [gentoo-user] Re: Postgres gem not found by cron job | ||
Date: | Fri, 13 Aug 2010 19:05:15 | ||
Message-Id: | ltfgj7-n66.ln1@graaff.xs4all.nl | ||
In Reply to: | Re: [gentoo-user] Postgres gem not found by cron job by Michael Orlitzky |
1 | On Wed, 11 Aug 2010 15:32:53 -0400, Michael Orlitzky wrote: |
2 | |
3 | > Thanks for the tip. The cron environment was missing |
4 | > "RUBYOPT=-rauto_gem" -- adding it fixed the problem. |
5 | > |
6 | > Dark magic, whatever it does. |
7 | |
8 | It ensures that installed gems are found automatically without |
9 | specifying this explicitly in your script. The other solution |
10 | is to "require 'rubygems'" first in your script. |
11 | |
12 | Kind regards, |
13 | |
14 | Hans |