Questions tagged [bcrypt-ruby]

The bcrypt Ruby gem provides a simple wrapper for safely handling passwords.

Bcrypt-ruby gem is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling passwords.

If you store user passwords in the clear, then an attacker who steals a copy of your database has a giant list of emails and passwords. Some of your users will only have one password -- for their email account, for their banking account, for your application. A simple hack could escalate into massive identity theft.

It's your responsibility as a web developer to make your web application secure -- blaming your users for not being security experts is not a professional response to risk.

Source: https://rubygems.org/gems/bcrypt-ruby

109 questions
2
votes
2 answers

Error installing bcyrpt-ruby gem bundle

I'm trying to install the Devises gem, running bundle install and then getting this error with bcrypt-ruby which I haven't had before. What can I do? Installing bcrypt-ruby (3.0.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR:…
Ed Fry
  • 93
  • 1
  • 6
1
vote
2 answers

Why is my Rails app returning "Password is too short (minimum is 6 characters)" when I have the correct amount of characters?

I am building a simple registration page. Here is my User model with it's validations, and associations: class User < ApplicationRecord has_secure_password has_many :posts has_many :comments has_many :likes validates :username,…
Isaac Medina
  • 332
  • 1
  • 5
  • 17
1
vote
0 answers

Cannot load such file -- 2.4/bcrypt_ext

I am trying to run rails s on my project but when I do this error pops up: C:/ror/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10-x64-mingw32/lib/mysql2/2.4/mysql2.so: warning: constant ::TimeoutError is deprecated rails aborted! LoadError: cannot…
LLBrettK
  • 113
  • 1
  • 10
1
vote
1 answer

Rails 5: Gem bcrypt - is throwing an error "cannot load such file -- bcrypt"

I am a Rails beginner. When i am trying to use gem bcrypt, i see an error on my screen "cannot load such file -- bcrypt" control stuck at 'has_secure_password' line of Model. Server logs LoadError (cannot load such file --…
1
vote
1 answer

Can't figure out how to get 'bcrypt' working in ruby on rails (WIN 10)

I've almost given up , after trying countless solutions , nothing has worked for me till now. I'm running Ruby 2.3.3 and rails 4.2.8 on windows 10 64-bit I've installed Ruby , Rails and DevKit using Rails Installer. I installed bcrypt v 3.1.7 ( to…
Mihir Deshpande
  • 105
  • 2
  • 2
  • 5
1
vote
1 answer

Password Authentication using BCrypt

I'm trying to build a very simple login page with username and password authentication using BCrypt. There are two features, the first is to create a username and password, and the second is authenticate using login page. (create a new user, login…
RacketyGnome300
  • 77
  • 2
  • 2
  • 7
1
vote
0 answers

NameError Exception: uninitialized constant BCrypt Rails 5, Windows

I am using Devise with Rails 5 on Windows. I know about the problem with Windows and BCrypt and I am following the instructions from internet to make it work: uninstall all bcrypt gem versions with gem uninstall bcrypt and select option 3 (if…
gdfgdfg
  • 3,181
  • 7
  • 37
  • 83
1
vote
1 answer

Bundler::GemNotFound: Could not find erubi-1.7.0 in any of the sources

Hello i have a problem with bundle. I am actually developing a rails app in a docker (dockerized rails) I need to add the bcrypt gem, but when i add this gem and run bundle install ans bundle update i got this error message : Thanks for help web_1 …
1
vote
3 answers

LoadError in Devise::SessionsController#create -- cannot load such file -- bcrypt_ext

I am getting the following error and I have no idea what to do. I have tried all the available solutions on internet but I cannot get rid of this problem. I am attaching the screen shot of the error. I am using mysql2, rails version is "Rails…
1
vote
3 answers

ruby on rails, run server not working because of bcrypt_ext (LoadError)

I got the gems from https://github.com/mhartl/rails_tutorial_3rd_edition_gemfiles/blob/master/sample_app/Gemfile then I get an error message like C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7-x86-mingw32/li b/bcrypt.rb:16:in…
me sung
  • 73
  • 1
  • 2
  • 8
1
vote
2 answers

An error occurred while installing bcrypt 3.1.7 and bundler cannot continue

I'm using rubystack2.2.0. When I run bundle install for a new project that uses bcrypt, I'm getting this error: Installing bcrypt 3.1.7 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension and here is the verbose…
Novice
  • 423
  • 1
  • 9
  • 17
1
vote
1 answer

Rails: remote authentication through devise

Let's say I have a default user authorization through devise in my rails app (using the default bcrypt encryptor). I'm trying to make something like gui application, when user can sign in using rails application password. But I don't want to send my…
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
1
vote
0 answers

Openshift doesn't install bcrypt

I'm trying to push my Ruby on Rails app to OpenShift but something is going wrong with the gem file bcrypt. Everything is ok locally, just when I try to run on the Openshift side this error occur. No such file to load -- bcrypt (LoadError) …
1
vote
1 answer

Unexpected behaviour of user.authenticate() with Rails in test environment

I want to make an acceptance test for the signing in flow, and I'm experiencing an unexpected behaviour of user.authenticate method. Authentication in development environment works as expected: a POST with email and plain password pair passes it…
Misha Karpenko
  • 2,168
  • 17
  • 18
1
vote
1 answer

Using BCrypt in Rails to manually authenticate

I'm trying to use BCrypt in my rails app to save user's passwords securely. I'm able to save the encrypted password just fine and even compare it against the original plain text string to successfully verify it. The problem seems to be that every…
Jason Burgett
  • 117
  • 1
  • 10