You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
irb(main):001:0> require 'bcrypt'
Traceback (most recent call last):
10: from /Users/helosshi/.rbenv/versions/2.7.2/bin/irb:23:in `<main>'
9: from /Users/helosshi/.rbenv/versions/2.7.2/bin/irb:23:in `load'
8: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
7: from (irb):1
6: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
5: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
4: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
3: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-3.1.16/lib/bcrypt.rb:12:in `<top (required)>'
2: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
1: from /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
LoadError (dlopen(/Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle, 9): no suitable image found. Did find:)
/Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle: mach-o, but wrong architecture
/Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle: mach-o, but wrong architecture - /Users/helosshi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle
I search this error, but I can't found how to fix.
And I ask this error to my mentor, but he also can't resolved this error.
So, I make this issue.
please give me advise.
thanks.
I'm not sure if this will solve the issue for everyone, but when I was doing some searching, I ran across someone having a similar issue on protocolbuffers. They mentioned that the error was related to the gem missing the arm64 binaries for the extensions.
I ran gem install bcrypt --platform=ruby and was able to use the BCrypt gem without issue in my test rails app and in rails console.
Activity
mscwilson commentedon Feb 7, 2021
I am having the same problem.
trouni commentedon Feb 23, 2021
Got this solved by first uninstalling
bcryptwithgem uninstall bcrypt, thenbundle install(orgem install bcrypt).elviajero971 commentedon Apr 5, 2021
I've got the same issue but couldn't resolve it with your tips...
wmcraver commentedon Mar 14, 2022
I'm not sure if this will solve the issue for everyone, but when I was doing some searching, I ran across someone having a similar issue on protocolbuffers. They mentioned that the error was related to the gem missing the arm64 binaries for the extensions.
I ran
gem install bcrypt --platform=rubyand was able to use the BCrypt gem without issue in my test rails app and in rails console.