【问题标题】:foreman in test environment?测试环境的工头?
【发布时间】:2023-04-04 16:46:01
【问题描述】:

简单的问题。如何在测试环境中使用 Foreman 启动 Rails?

RAILS_ENV=test bundle exec foreman start
// 在开发中开始

bundle exec foreman -e test start
// 炸弹

bundle exec foreman start -e test
// 炸弹

【问题讨论】:

    标签: ruby-on-rails foreman


    【解决方案1】:

    Foreman 必须指向一个 Procfile,或者 Procfile 必须存在于当前目录中。

    # Procfile
    rails s
    

    然后你会跑

    foreman start -f Procfile
    

    通常的做法是保留 Procfile.test、Procfile.dev 等。

    # Procfile.test
    rails s -e test
    

    希望有帮助:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多