How to use a guard with a master?

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

how will this stone be used to start processes in Procfile instead of starting rails s?

I already found a foreman gem that can read and run every process specified in the Procfile file, c foreman start.

Thank! -A

Change 1

This is a bad approach. Each process must be individually controlled by a security guard so that they can

  • restart independently and
  • will be launched with development friendly flags
+5
source share
1 answer

you can fork the gem and add your changes to the RailsRunner with a hard-coded command:

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

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

+1
source

All Articles