Skip to content
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

Support for ARM/M1 #87

Closed
neilconway opened this issue Jan 25, 2021 · 5 comments
Closed

Support for ARM/M1 #87

neilconway opened this issue Jan 25, 2021 · 5 comments

Comments

@neilconway
Copy link

Unsurprisingly, rb-fsevent doesn't work on 11.1 + M1 out of the box:

[2021-01-25T12:58:33.953098 #52611] ERROR -- : Exception rescued in listen-worker_thread:
Errno::EBADARCH: Bad CPU type in executable - /Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rb-fsevent-0.10.4/bin/fsevent_watch
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rb-fsevent-0.10.4/lib/rb-fsevent/fsevent.rb:140:in `popen'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rb-fsevent-0.10.4/lib/rb-fsevent/fsevent.rb:140:in `open_pipe'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rb-fsevent-0.10.4/lib/rb-fsevent/fsevent.rb:39:in `run'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/adapter/darwin.rb:49:in `block in _run'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/thread.rb:26:in `rescue_and_log'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/thread.rb:18:in `block in new'
--- Thread.new ---
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/adapter/darwin.rb:49:in `_run'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/adapter/base.rb:79:in `block in start'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/thread.rb:26:in `rescue_and_log'
/Users/neilconway/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/listen-3.4.1/lib/listen/thread.rb:18:in `block in new'
@thibaudgg
Copy link
Member

Version 0.11.0 has been released with mac M1 support, please give it a try!

@thomasdarde
Copy link

hi @thibaudgg it's unclear for me how to instruct rb-fsevent to recompile the executalble.
It still shows as intel in activity monitor

@thibaudgg
Copy link
Member

@kevintom @PabloC I still don't have an M1 Mac to help @thomasdarde here, could you please do so?

@rylanb
Copy link

rylanb commented Mar 17, 2022

Mine is still showing as intel in activity monitor as well and I'm struggling to get 2.7.5 + rails working on my M1 MBP computer, as well.

The only thing I've found that works to get it running is:
config.file_watcher = ActiveSupport::EventedFileUpdateChecker => config.file_watcher = ActiveSupport::FileUpdateChecker in development.rb

However, I have another app that runs fine w/ EventedFileUpdateChecker on Ruby 2.7.5. So I'm very confused on what my issue is and how to resolve it. That one runs and Activity Monitor still says 'intel' for fsevent.

Edit: Further update and on a recent update to Puma setup, workers were getting sent by default, so it seems workers 0 in the puma.rb config file finally fixed this up for me. W/ the EventedFileUpdateChecker bit. So this is all good for now, unless I run into more issues tomorrow. I wanted to drop this in case someone follows after me and has a similar issue. Seems like user error w/ config in puma.

@nate-at-gusto
Copy link

Works great on M1, this can be closed @thibaudgg

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

No branches or pull requests

5 participants