尝试运行rake任务时出现Crontab错误 - 无论何时使用gem

时间:2012-07-20 18:41:55

标签: ruby-on-rails-3.2 crontab rake-task whenever

我创建了一个简单的rake任务。我试图使用https://github.com/javan/whenever/ gem每天运行一次这个任务。但是,没有任何任务被解雇。

在我的/ var / mail / *文件中,

From: root@Gupta (Cron Daemon)
To: shubham@Gupta
Subject: Cron <shubham@Gupta> /bin/bash -l -c 'cd /home/shubham/Desktop/rails_apps/crispics && RAILS_ENV=development bundle exec rake update_time_elapsed --silent'
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/shubham>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=shubham>
Message-Id: <20120720180401.E2D7AD4092D@Gupta>
Date: Fri, 20 Jul 2012 23:34:01 +0530 (IST)

tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
ERROR: Gem bundler is not installed, run `gem install bundler` first.

我的系统中安装了bundler,如果我从crontab键入命令到命令提示符,则会触发任务。

1 个答案:

答案 0 :(得分:0)

在项目应用中运行

bundle update