如何与领班一起使用守卫?
鉴于 guard-rails gem 是启动 Rails 服务器并在运行期间自动重新启动它的简单方法随着源文件的变化而开发;
应该如何使用这个 gem 来启动 Procfile 中的进程而不是让它运行 rails
?
我已经找到了 foreman gem,它可以使用 读取并启动 Procfile 中列出的每个进程工头开始
。
谢谢! -A
Edit 1
这是一个糟糕的方法。每个进程应由守卫单独管理,以便它们可以
- 独立重新启动,并
- 使用开发友好的标志启动
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 managed individually by guard so that they can
- be restarted independently, and
- be launched with development-friendly flags
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以分叉 gem 并将更改添加到具有硬编码命令的 RailsRunner:
you could fork the gem and add your changes to the RailsRunner that has a hardcoded command:
https://github.com/guard/guard-rails/blob/master/lib/guard/rails/runner.rb