【问题标题】:How to run a custom command when run the 'rails server' command?运行“rails server”命令时如何运行自定义命令?
【发布时间】:2011-11-24 22:17:55
【问题描述】:

我正在使用 Ruby on Rails 3.1.0 和 DelayedJob gem。为了在开发模式下自动化流程,我想“自动”运行以下命令

rake jobs:work

在我的控制台\终端中我运行这个其他命令

rails server

# and/or
#
# rails db:create
# rails db:migrate
# ...

有可能吗?我该怎么做?

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 command-line automation


    【解决方案1】:

    宝石“工头”将为您解决这个问题。这是 railscast:http://railscasts.com/episodes/281-foreman

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-16
      • 1970-01-01
      • 1970-01-01
      • 2018-01-02
      • 2011-05-16
      • 1970-01-01
      相关资源
      最近更新 更多