I've faced an issue when trying to run a console on my Ruby on Rails project. It gives me the following error:
/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `require': dlopen(/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle, 0x0009): tried: '/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/msgpack.bundle' (no such file), '/usr/lib/msgpack.bundle' (no such file) - /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle (LoadError)
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `require'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `block in <top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/explicit_require.rb:45:in `rescue in with_gems'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/explicit_require.rb:41:in `with_gems'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache.rb:61:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache.rb:61:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap.rb:5:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap.rb:5:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/setup.rb:3:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/setup.rb:3:in `<top (required)>'
from /Users/artemhb/scheduled_tweets/config/boot.rb:4:in `require'
from /Users/artemhb/scheduled_tweets/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `require': dlopen(/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle, 0x0009): tried: '/Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/msgpack.bundle' (no such file), '/usr/lib/msgpack.bundle' (no such file) - /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle (LoadError)
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `require'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `block in <top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/explicit_require.rb:42:in `with_gems'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache/store.rb:5:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache.rb:61:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/load_path_cache.rb:61:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap.rb:5:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap.rb:5:in `<top (required)>'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/setup.rb:3:in `require_relative'
from /Users/artemhb/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/bootsnap-1.10.1/lib/bootsnap/setup.rb:3:in `<top (required)>'
from /Users/artemhb/scheduled_tweets/config/boot.rb:4:in `require'
from /Users/artemhb/scheduled_tweets/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
A few Gems that seem not to work with an ARM architecture: mgspack and bootsnap. I was able to solve an issue with one Gem however – bcrypt by installing the right version of it gem install bcrypt --platform arm-linux. Does anyone know how would I prevent this?
Thank you in advance!