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
3
votes
1 answer

can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.2

When I try to run heroku run rake db:migrate I get this error: can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.2. Make sure all dependencies are added to Gemfile. I have updated my Gemfile and specified the version of…
Tim
  • 3,191
  • 2
  • 16
  • 22
3
votes
1 answer

Unknown attribute rails 4

im new into Rails 4 development and rails in general. I red official "getting started with rails" guide where it is shown how to create blog. So I want to do my own from 0 registration, auth system. While creating new user I get this error. I do…
andris
  • 99
  • 4
  • 13
3
votes
1 answer

Rails - has_secure_password with password AND PIN - password_digest limitation

I want to have two layers of authentication - I'll call them "hard" and "soft" authentication. The hard layer is the standard email-and-password layer. I've currently implemented this using has_secure_password and the bcrypt-ruby gem as described in…
JoshDoody
  • 417
  • 1
  • 4
  • 14
3
votes
3 answers

Can't install bcrypt-ruby for new Rails installation

I'm getting the following error on a new Rails installation. I run bundle install and after installing a bunch of gems, I get an error upon trying to install bcrypt-ruby. I'm using a brand new Mac with OS X 10.8.2, latest Ruby (v1.9.3-p194), new…
at.
  • 50,922
  • 104
  • 292
  • 461
2
votes
1 answer

Loading error:bcrypt

I have created a admin panel using ROR platform. Now whenever I try to login I'm getting this error : Cannot load such file bcrypt_ext I have come across this error in the past but used to rectify it by uninstalling and reinstalling it using the…
user9857635
2
votes
1 answer

Rails- not able to save user's password bcrypt

I have user model and controller, user has password, password_confirmation, and password_digest fields. I have used bcrypt ruby gem. When I create user, I give all above mentioned fields and user gets created. But User's password wont be saved, it…
suhasa
  • 97
  • 1
  • 12
2
votes
1 answer

rails 4.2.4 Uninitialized Constant User::BCRYPT

I have rails app with a login auth that i got from RoR tutorial by Micheal Hartl. The login has a remember me for cookie logins. The problem is when a user cookie exist and i start my rails app, i got this error Processing by PagesController#index…
Remson
  • 73
  • 5
2
votes
1 answer

Simulating a login attempt with incorrect password in an RSpec controller spec raises BCrypt::Errors::InvalidHash

The SessionController spec for an app I'm working on currently looks like this: require 'rails_helper' RSpec.describe SessionController do let(:user) { create(:user, phone_verified: true, email_verified: true) } describe "POST #create" do …
kevinjy
  • 21
  • 2
2
votes
1 answer

Error message after implementing has_secure_password

I have developed some tests in Rails that work fine. Then I added: In model file: has_secure_password In Gem file: gem 'bcrypt', '3.1.7' (after bundle install it shows up in Gemfile.lock) I added password_digest as string to the migration file (and…
Nick
  • 3,496
  • 7
  • 42
  • 96
2
votes
1 answer

Create user in Active Admin

I am trying to create users using active admin. I am following along the authentication from scratch railscast to do so. Currently I have set up the resource with the following command: rails g resource user name:string username:string…
user2184718
  • 675
  • 1
  • 12
  • 30
2
votes
6 answers

bcrypt-ruby - You don't have bcrypt-ruby installed in your application

I'm beginner in Ruby on Rails and trying to learn from http://ruby.railstutorial.org/ I'm creating sample_app and got stuck at chapter 6. My Ruby version: ruby 2.0.0p195 (2013-05-14) [i386-mingw32] My Rails version: Rails 4.0.0 I have following…
Nilesh
  • 21
  • 1
  • 6
2
votes
3 answers

Error while using has_secure_password. cannot load such file -- 2.0/bcrypt_ext

I'm new to Ruby on Rails ans so I'm following the Tutorial Agile Web Development with Rails 4. But on the User Authentification I'm getting an Error which I just can't solve... I've made a Form so the Users can log in and for that I'm using…
LxSwiss
  • 547
  • 1
  • 7
  • 20
2
votes
2 answers

How to protect a user password with bcrypt and mongoid

I've just started out using MongoDB and, in particular, Mongoid. naturally I'd like to ensure my User's passwords are kept nice and secure, and previously I'd have done this with ActiveRecord and used bcrypt. I'm looking for a nice, clean, secure,…
Dave Sag
  • 13,266
  • 14
  • 86
  • 134
2
votes
1 answer

failed to build native extension for bcrypt-ruby gem under cygwin on windows xp

I am setting up a testing agent on Windows XP for a Rails App. To enforce consistency between Agents, I am installing it through Bundler with RVM with Cygwin. The following is the result of running bundle install in the project directory(EDIT: Note…
Abraham P
  • 15,029
  • 13
  • 58
  • 126
2
votes
1 answer

Cygwin :: bcrypt-ruby - ERROR: Failed to build gem native extension

When I try I install bcrypt-ruby gem I get the following error I have Cygwin on Windows 7 32 $ gem install bcrypt-ruby Building native extensions. This could take a while... ERROR: Error installing bcrypt-ruby: ERROR: Failed to build gem…
Bartek S
  • 532
  • 4
  • 19