开发者

How to use guard with foreman?

Given the guard-rails gem is an easy way to start a rails server and to relaunch it automatically during development as the source files change;

how should this gem be used to launch the processes in a Procfile instead of having it run rails s?

I have already found the foreman gem, which can read and start each process listed in the Procfile with foreman start.

Thanks! -A

Edit 1

This is a bad approach. Each process should be 开发者_如何学Gomanaged individually by guard so that they can

  • be restarted independently, and
  • be launched with development-friendly flags


you could fork the gem and add your changes to the RailsRunner that has a hardcoded command:

  %{sh -c 'cd #{Dir.pwd} && rails s #{rails_options.join(' ')} &'}

https://github.com/guard/guard-rails/blob/master/lib/guard/rails/runner.rb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜