rails / spring-watcher-listen

MIT License
64 stars 35 forks source link

Disable with `DISABLE_SPRING_WATCHER_LISTEN` env var #28

Closed f1sherman closed 1 year ago

f1sherman commented 2 years ago

We have a project where some Engineers are running configurations that do not support inotify, which causes an error when this gem is loaded. We still want these Engineers to be able to use Spring in polling mode. We tried setting require: false in the Gemfile but Spring loads the gem anyway.

This change introduces a new env var DISABLE_SPRING_WATCHER_LISTEN which, along the lines of DISABLE_SPRING, disables the functionality in this gem.

There are probably a few ways to solve this problem but I wanted to submit this for your consideration. Feedback welcome!