-
Notifications
You must be signed in to change notification settings - Fork 79
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
Function not implemented - Failed to initialize inotify (Errno::ENOSYS) Apple M1 linux/amd64 platform #34
Comments
I'm having the same issue using RC1. Diagnostics ID -> 3726840A-0F9B-4159-9004-2858654FAC31/20210322173340 |
This issue comes because the M1 arm docker is using qemu and this doesn't support inotify. To fix this comment this line
in |
The workaround worked for me. Thanks |
Thanks it worked! |
Anyone else landing here and still not getting past this problem, the answer on this Stack Overflow worked for me. |
I was running the project in a docker container (from ruby image) on a M1 Air but I built the container with amd64 architecture using |
* This causes problems in docker+apple m1 (`ActiveSupport::EventedFileUpdateChecker` isn't working on Docker for Apple Silicon (M1) at the moment.) More here: evilmartians/terraforming-rails#34 * Make sure we use amd64 for Mac OS X M1 compatibility
This still creates the same error when I try to run something on Docker CLI |
same here |
To me, the best way to make it work is
|
The only way I was able to get this to work is to follow everything here and then also export DISABLE_SPRING=true In my example, I was simply trying to get to the console via |
* Fixes Apple M1 Issue w/ Docker (#672) - This causes problems in docker+apple m1 (`ActiveSupport::EventedFileUpdateChecker` isn't working on Docker for Apple Silicon (M1) at the moment.) More here: evilmartians/terraforming-rails#34 - Make sure we use amd64 for Mac OS X M1 compatibility * Update Dependencies for May 2022 (#673) - ruby: Upgrade Ruby from 2.7.5 to 2.7.6 - Gemfile.lock: Update nokogiri from 1.13.3 to 1.13.6 - Gemfile[.lock]: Update rails (5.2.6.3 --> 5.2.8) and its dependencies Also updates a few indirect dependencies. Specifically: concurrent-ruby, i18n, loofah, mini_mime, and thor. - Gemfile.lock: Update puma from 5.6.2 to 5.6.4 - yarn.lock: Update minimist from 1.2.5 to 1.2.6 - yarn.lock: Update node-forge from 1.2.1 to 1.3.1 - yarn.lock: Update swagger-ui from 4.1.3 to 4.7.0 Also update some of its dependencies, such as @braintree/sanitize-url. - yarn.lock: Update async from 2.6.3 to 2.6.4 - Revert "yarn.lock: Update swagger-ui from 4.1.3 to 4.7.0" It broke when updating, not sure why. Possibly webpack-related??? Back to swagger-ui 4.1.3. - deps: Resolve @braintree/sanitize-url to v6.x Was v5.x. (This is a JS dependency, in package.json and yarn.lock.) - yarn.lock: Update eventsource from 1.0.7 to 1.1.1 - Gemfile.lock: Update rack from 2.2.3 to 2.2.3.1 * update to new maps public key (#675) - update to new public key - upgrade to rails 6 - add net gems to Gemfile - update lock file - fix linting errors with upgrade - use proper "visible" syntax - update API gems - change to old css rspec helper * Update dependencies for early October 2022 (#676) - yarn.lock: Update terser - yarn.lock: Dedupe dependencies - ruby: Bump Ruby from 3.1.0 to 3.1.2 (Was recently updated from 2.7.6 to 3.1.0 in PR 675) Co-authored-by: Mikena Wood <[email protected]> Co-authored-by: Ernesto Tagwerker <[email protected]>
livereload breaks because qemu [isn't supported by inotify](evilmartians/terraforming-rails#34 (comment)).
Another solution (rather than commenting out the So in config.file_watcher = ActiveSupport::EventedFileUpdateChecker with: config.file_watcher = ActiveSupport::FileUpdateChecker |
on my app this line is not exists |
The discussion does not explicitly point to the alternative solution/workaround, which is to specify a compatible OS/architecture for the docker image: Instead of the image specified in the original post ...
use the In the Dockerfile
|
There seems to be an issue with the listen running on linux/amd64. I found a workaround which seems fine since we're likely to stop using sprockets. evilmartians/terraforming-rails#34 (comment)
There seems to be an issue with the listen running on linux/amd64. I found a workaround which seems fine since we're likely to stop using sprockets. evilmartians/terraforming-rails#34 (comment)
https://orbstack.dev/ has solved the problem on amd64 containers |
Without this setting enabled, you will get the following fatal error every time you try to run a rake command in docker: Errno::ENOSYS: Function not implemented - Failed to initialize inotify /usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize' See evilmartians/terraforming-rails#34 for a description of the problem.
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Apple M1 + Docker + OSX < 13 = trouble with filesystem listening because of QEMU-based emulation something something, see further details on the issue. In the meantime disable inotify which makes performance much better when firing up Guard and other commands in Docker. [1]: evilmartians/terraforming-rails#34 (comment)
Without this setting enabled, you will get the following fatal error every time you try to run a rake command in docker: Errno::ENOSYS: Function not implemented - Failed to initialize inotify /usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize' See evilmartians/terraforming-rails#34 for a description of the problem.
Ruby Image: --platform=linux/amd64 ruby:2.7.2-slim-buster
Rails: 6.1.3
Device: Apple m1 macbook pro
After running
docker-compose run --rm rails ./bin/setup
Got:
Update:
It's docker for mac problem, so redirected to their issues: #docker/for-mac#5321
Temporary solution:
#from20020516/checkparam-rails@93a7d45
The text was updated successfully, but these errors were encountered: