Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the listen gem doing?

I found the gem listen comes with a rails new as a gem in the development group.

I was wondering what it was doing and even reading the documentation (https://github.com/guard/listen) didn't help me any further. It says it

listens to file modifications and notifies you about the changes

I then also removed it from my app but didn't notice any changes. So my question is:

What is the listen gem doing? And in which cases is it helpful?

EDIT: I get, that these questions are too open to ask for stack overflow, but where can I ask questions like that than?

like image 821
Clara Avatar asked Jan 24 '19 10:01

Clara


1 Answers

listens to file modifications and notifies you about the changes

It watches your files as you change them. If you make a change and save it, listen picks it up and notifies whoever is subscribed.

This way, rails reloads your files when you save them. And something like guard can re-run affected specs.

like image 129
Sergio Tulentsev Avatar answered Nov 05 '22 09:11

Sergio Tulentsev