Rake command not working in cron but works when running as command

I have placed the following in crontab (Executes for every minute)

* * * * * cd /home/foo/Projects/redmine-2-4-2-prod && /home/foo/.rvm/gems/ruby-2.0.0-p0/bin/rake RAILS_ENV=production --silent redmine:email:receive_imap host=imap.gmail.com port=993 ssl=1 username=foo@gmail.com password='foopass' project=testredmine tracker=Support status=New priority=High allow_override=project,status,tracker,priority

I see cron running every minute in logs (/var/log/syslog). On executing the above command in shell, I receive e-mails. But not receiving e-mails when the same command is executed in cron.

Please help me to know, what am I missing.


Try to add somethin like this to your cron task:

source /home/user/.rvm/environments/ruby-1.9.3

Path to your rvm files you can get by:

rvm env --path

Need Your Help

ASP.Net MVC HABTM Association

asp.net asp.net-mvc linq-to-sql has-and-belongs-to-many

I must be missing something, when trying to define a HABTM association with 2 of my models. I have a "Product" table, and a "Category" table, and a "ProductsCategories" join table. In SQL Server,...

I want to drag object along z axis with touch in unity3d

android unity3d touch

I want to use unity3d and Vector3 drag object with touch on z-axis(Android)