I'm trying to install stringio 3.0.6 as a part of project dependencies tree via bundle install, but apparently it does not work as it should because of the error mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')
.
The full stacktrace is below:
<internal:/Users/sviat/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
`require':
dlopen(/Users/sviat/.rvm/gems/ruby-3.1.2/gems/stringio-3.0.6/lib/stringio.bundle, 0x0009):
tried: '/Users/sviat/.rvm/gems/ruby-3.1.2/gems/stringio-3.0.6/lib/stringio.bundle'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
'/System/Volumes/Preboot/Cryptexes/OS/Users/sviat/.rvm/gems/ruby-3.1.2/gems/stringio-3.0.6/lib/stringio.bundle' (no such file), '/Users/sviat/.rvm/gems/ruby-3.1.2/gems/stringio-3.0.6/lib/stringio.bundle'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) -
/Users/sviat/.rvm/gems/ruby-3.1.2/gems/stringio-3.0.6/lib/stringio.bundle (LoadError)
I'm constantly getting the error above despite I have done everything below:
bundle config set force_ruby_platform true
;ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin22]
;source ~/.zshrc
.arm64
.gem list stringio
, but not with arch -arm64 gem install stringio
. The error will be as above.What else I can try? I've reinstalled my ruby and tried to do the same with RBENV, etc. Restarted my laptop and switched the electricity without any success.
MacOS - Ventura 13.4; Chip - M1. Ruby - 3.1.2. RVM - latest. Terminal - arm64.
Well by the end of the day I have fixed this up by using rvm instead of rbnev. removed all the stuff related to ruby and rbnev from my machine, reloaded PC, and installed everything on top of rvm