FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

I can't use bcrypt on Apple M1 Chip · Issue #239 · bcrypt-ruby/bcrypt-ruby · GitHub

Repository navigation

I can't use bcrypt on Apple M1 Chip #239

Description

Specs

  • MacBook Air(Apple M1 Chip)
  • macOS 11.1
  • ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin20]
  • bcrypt (3.1.16)

Details

When I try require 'bcrypt' by irb.

I got this error.

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.

Activity

  1. mscwilson commented on Feb 7, 2021

    I am having the same problem.

  2. trouni commented on Feb 23, 2021

    Got this solved by first uninstalling bcrypt with gem uninstall bcrypt, then bundle install (or gem install bcrypt).

  3. elviajero971 commented on Apr 5, 2021

    Got this solved by first uninstalling bcrypt with gem uninstall bcrypt, then bundle install (or gem install bcrypt).

    I've got the same issue but couldn't resolve it with your tips...

  4. wmcraver commented on 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=ruby and was able to use the BCrypt gem without issue in my test rails app and in rails console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL