Skip to content

BCrypt 3.1.11 (x86-mingw32): cannot load such file -- bcrypt_ext #149

Description

@TheFlow0360

I recently created a new Rails project after installing Ruby and Rails on Windows with RailsInstaller. In my gemfile, I reference bcrypt like this:
gem 'bcrypt', '~> 3.1.7', platforms: :ruby (I added the platforms: :ruby, without server won't start with the same error as described further below)

The server can be started, no problems here, but wen instantiating a model with has_secure_password I get the following error message:

You don't have bcrypt installed in your application. Please add it to your Gemfile and run bundle install
Completed 500 Internal Server Error in 16ms (ActiveRecord: 0.0ms)

LoadError (cannot load such file -- bcrypt_ext):

app/models/access.rb:2:in <class:Access>' app/models/access.rb:1:in <top (required)>'
Rendering C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
Rendering C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
Rendered C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.0ms)
Rendering C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms)
Rendering C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
Rendered C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (358.0ms)
Exiting

I tried fixing the version of bcrypt to 3.1.9, because I found this issue where a similar error occurred for the 3.1.7 and the solution was to use 3.1.9, but this didn't help at all, on the contrary: Afterwards the server wouldn't start at all.

I know there is Issue 142, but their solution doesn't work for me.

Does anyone have an idea how I could fix this?

Activity

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