I've been cruising along with Ruby on my trusty M1 Mac for a while now, no sweat, especially in good old x86_64 mode (installed via RVM on a Rosetta terminal). Life was good.
rvm ls
ruby-2.7.7 [ x86_64 ]
=* ruby-3.0.5 [ arm64 ]
ruby-3.0.6 [ x86_64 ]
I decided to embrace the native future and install Ruby 3.0.5 in its native arm64 mode. Easy peasy, right? Wrong...
Sure, it installs without a hitch, and it even looks like it's behaving. I happily installed my Rails gems through bundle install, thinking I was in the clear. But as soon as I try toboot up my Rails app I get slapped with this delightful message:
dyld[*****]: missing symbol called
I even reinstalled libffi sith arm64 homebrew as it could be related per some instructions I found in the web but got no success on rvm reinstalls since it eventually ended up failing with the same error...
I found this related SO post but it doesn't apply to me because it was related to mysql - my project uses postgres.
There's another sad, lonely StackOverflow post out there with zero answers, and it's like looking in a mirror. A sad, unsolved mirror...
I reinstalled libyaml and libffi and before reinstalling Ruby, no luck. Set the LDPFlags pointing to the ffi binaries, also no luck. I did everything I could find online and nothing solved it...
It's either some gem with a native extension (most likely) or some other lib/binary that you've installed through Rosetta.
Assuming there's no other info in the error, we'll need to try solving this with a shotgun instead of a scalpel. So I'd start by removing/reinstalling rvm entirely (in fact, I'd take this opportunity to upgrade to
asdf) so you can know none of the gems with native extensions were built in Intel/Rosetta mode.If that doesn't work, then repeat with homebrew.