views:

194

answers:

1

Hi,

I have finally managed to get javan-whenever gem working on my site5 server, and updating the crontab is quite easy, however whenever a cron job is run with the code that is generated, i get a "missing required gems" error where it lists about 8/10 of my gems.

Has anyone else had this problem? If so, what would the solution be.

The funny thing is that when it outputs where my gems are, this is all correct, and the gems are loading fine from within my application.

Cheers, Matenia

A: 

I somehow managed to get this working via creating script/CUSTOMscript files and running the cron job through there .. would be glad to show someone if theyre having the same problem.

Matenia Rossides
Yes, please! I'm having an issue where my gems aren't being found when running rake db:migrate through capistrano.
Jonathan R. Wallace
the script/yourscriptname should contain the following:#!/usr/bin/env rubyrequire File.dirname(__FILE__) + '/../config/environment'#rake 'sendnewsletter'require 'rake'require 'rake/testtask'require 'rake/rdoctask'require 'tasks/rails'Rake::Task['sendnewsletter'].invokethen this invokes my custom rake task which is called :sendnewsletter.Then I set up the cron job in the cpanel backend to run the script every week. its a bit cumbersome, but it works. and I don't have that many custom rake tasks to worry about so it's manageable.
Matenia Rossides