I'm having problems running my rake task from cron, I wrap it in shell file and when I execute this shell file from console it works fine.
#!/bin/sh
if ps -ef | grep -v grep | grep create_all_accounts ; then
exit 0
else
cd /home/prosoftstudio/www/prosoftstudio_egabinet && /home/prosoftstudio/www/.ruby/gems/1.8/bin/rake gabinet:create_all_accounts RAILS_ENV=production --trace
exit 0
fi
Entry in crontab looks like this(I set PATH and GEM_PATH)
PATH=/home/prosoftstudio/www/.python/bin:/usr/local/python2.6/bin:/home/prosoftstudio/www/.ruby/gems/1.8/bin/:/usr/local/ruby1.8/bin:/usr/local/bin:/usr/bin:/bin:/us$
GEM_PATH=/home/prosoftstudio/www/.ruby/gems/1.8:/home/prosoftstudio/www/.ruby/gems/1.8/bundler/gems:/usr/lib/ruby/gems/1.8/
*/1 * * * * /home/prosoftstudio/www/cron_create_accounts.sh > cron_log.txt 2>&1
The output I get is
rake aborted!
git://github.com/100hz/rails-settings.git (at master) is not checked out. Please run `bundle install`
It seems like it can't find gems installed with
gem "rails-settings", :git => "git://github.com/100hz/rails-settings.git"
Anyone know how to fix this?