Skip to content

Disable with DISABLE_SPRING_WATCHER_LISTEN env var #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

f1sherman
Copy link
Contributor

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!

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](https://github.com/rails/spring/blob/a318a1837524ea6e39a7073af94e75131fcc95d1/lib/spring/commands.rb#L35-L46).

This change introduces a new env var `DISABLE_SPRING_WATCHER_LISTEN` which,
along the lines of `DISABLE_SPRING`, disables the functionality in this
gem.
@rafaelfranca rafaelfranca merged commit 229ff1e into rails:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants