guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

having problems with listening to a dir that is an sshfs mount. #561

Open rful011 opened 2 years ago

rful011 commented 2 years ago

As part of upgrading one of my systems I moved to new VM with a more up to date OS. To make the transition easier I mounted the directory from the old system on the new one using sshfs and pointed listen to that.

On the mounted system listen does not detect new files on the mounted volume -- is this a bug or a feature ?

Ubuntu 20.04

adigikian commented 1 year ago

I'm also having issue like this.

Listen gem works perfectly when I listen to a mounted directory by running a Rails server without daemonizing it. But when I run my rails server in daemon mode then Listen does not work. Below is the code snippet.

listener = Listen.to('/mnt/erx') do |modified, added, removed|
  Listen.logger.info "###############################  Listener ############################"
  Listen.logger.info "############################### #{listener.inspect} ############################"
  Listen.logger.info "#######################################################################"
  Listen.logger.info "###############################  Added ############################"
  Listen.logger.info "############################### #{added.inspect} ############################"
  Listen.logger.info "############################### First #{added.inspect} ############################"
  Listen.logger.info "#######################################################################"
end

listener.start