【问题标题】:Running custom rake tasks on heroku在 heroku 上运行自定义 rake 任务
【发布时间】:2014-01-22 19:16:11
【问题描述】:

我正在关注Rake in Background railscast 在后台运行一些作业。我可以在我的本地机器上做到这一点。

但它不适用于heroku。如何在 heroku 上运行这些自定义 rake 任务?

我可以使用heroku run rake my_task 从我的终端/shell 远程运行任务。但是,当我从 railscast 中提到的控制器调用它时,任务没有运行。

我比较熟悉delayed_job 和其他类似的gem。但我想实现自己的 rake 任务。

【问题讨论】:

    标签: ruby-on-rails heroku rake


    【解决方案1】:

    自己发现了错误。

    call_rake 操作中,/usr/bin/rake 路径在不同系统上有所不同。将其更改为 rake 并且一切都在 heroku 上正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-15
      • 2015-10-04
      • 2013-12-03
      • 2012-08-17
      • 1970-01-01
      • 2021-11-09
      • 2012-01-12
      • 2016-11-17
      相关资源
      最近更新 更多