Skip to content

Issue with devise and bcrypt on a macbook m1 rails install #250

Open

Description

@elviajero971

Hello there, I'm having some issues on a new mac m1 and my install of rails

System configuration

OS: macOS Big Sur Version 11.2.1 (20D74)

zsh: 5.8 (x86_64-apple-darwin20.0)

postgres: 13.2

Rails version: Rails 6.1.3

Ruby version: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin20]

Brew version: Homebrew 3.0.9

What I can do:

I have successfully:

  • create a rails app with rails new myApp -d postgresql
  • add gem devise to the Gemfile
  • run bundle install
  • create devise User and all CRUD views
  • run db:create, db:migrate
  • launch the server with rails s
  • access all the pages of login, sign up, etc...

Expected behavior

I'm expecting to be able to create an account and connect to it.

Actual behavior

When I try to create an account I'm running into an error about the gem bcrypt that seems to run on the wrong architecture...

Screenshot 2021-04-05 at 21 33 17

I've tried to reinstall everything but i still got the same error.

Anyone have an idea about the issue ?

Thanks by advance and have a good day to you all.

Activity

  1. joshbuker commented on May 19, 2021

    @joshbuker
    Contributor

    @elviajero971 digging around for the mach-o, but wrong architecture message came up with the following: grpc/grpc#24846, maybe try some of their steps to see if it solves your issues?

  2. wmcraver commented on Mar 14, 2022

    @wmcraver

    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