Installation of gem idn-ruby on arm64 fails

Viewed 162

On my Mac Silicon with arm64 architecture the idn-ruby gem installs with native extensions, but crashes on loading with a

LoadError:
  dlopen(/Users/user/.rvm/gems/ruby-3.0.3/gems/idn-ruby-0.1.4/lib/idn.bundle, 0x0009): symbol not found in flat namespace '_idn_free' - /Users/user/.rvm/gems/ruby-3.0.3/gems/idn-ruby-0.1.4/lib/idn.bundle

I tried to install / reinstall the libidn package with brew. (brew install libidn) and it installs, I also tried to install the idn-ruby gem with --with-idn-dir=/.. parameter.

Any ideas?

1 Answers

In my case I removed my ruby and brew and installed again, but I think to set a bundler config did finally the job:

bundle config build.idn-ruby --with-idn-dir="$(brew --prefix)"
Related