Function not implemented – Failed to initialize inotify (Errno::ENOSYS) Apple M1 linux/amd64 platform with Docker

Problem Statement

Device: Apple m1 macbook pro
Command docker-compose run

`/usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS)
sidekiq_1    | Function not implemented - Failed to initialize inotify
sidekiq_1    | /usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/linux.rb:34:in `new'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/linux.rb:34:in `_configure'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/base.rb:47:in `block in configure'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/base.rb:42:in `each'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/base.rb:42:in `configure'
sidekiq_1    | /usr/local/bundle/gems/listen-3.4.1/lib/listen/adapter/base.rb:66:in `start'
sidekiq_1    | /usr/local/lib/ruby/2.7.0/forwardable.rb:235:in `start'
`

Solutions

This issue comes because the M1 arm docker is using qemu and this doesn’t support inotify. To fix this comment this line in config/environments/development.rb

config.file_watcher = ActiveSupport::EventedFileUpdateChecker