Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7518869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:48:43+00:00 2026-05-30T01:48:43+00:00

When I add has_secure_password to the model (inherited from ActiveRecord::Base), error stating that bcrypt-ruby

  • 0

When I add has_secure_password to the model (inherited from ActiveRecord::Base), error stating that “bcrypt-ruby is not part of the bundle” occurs.

Here the log is:

Started GET "/users" for 127.0.0.1 at 2012-02-19 16:37:12 +0900

Gem::LoadError (bcrypt-ruby is not part of the bundle. Add it to Gemfile.):
app/models/user.rb:3:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
app/controllers/users_controller.rb:1:in `<top (required)>'

I installed bcrypt-ruby by

$ gem install bcrypt-ruby
Building native extensions.   This could take a while...
1 gem installed
Installing YARD (yri) index for bcrypt-ruby-3.0.1...
Installing RDoc documentation for bcrypt-ruby-3.0.1...

but was no avail.

I tried

$ bundle exec rails server

but was no help.

If I comment out the line “has_secure_password”, this error does not come out.

How can I solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:48:43+00:00Added an answer on May 30, 2026 at 1:48 am

    As the message says you need to add bcrypt-ruby to your Gemfile (at the root of the project).

    Adding

    gem "bcrypt-ruby"
    

    and then running bundle install should do the trick (this would fetch the gem if you hadn’t already installed it).

    You can specify specific versions to, eg

    gem "bcrypt-ruby", "~> 3.0.1"
    

    will get you the latest version that is >= to 3.0.1 but less than 3.1. You might do this if 3.0.1 has a bug fix you depend on and you’re happy to get more bug fixes but you don’t want major changes. There’s loads more info on the bundler website.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code for my user model: class User < ActiveRecord::Base has_secure_password
Wordpress has a filter that automatically add paragraphs to posts. I can remove this
How can I add a drop shadow effect to a website that has one
In other cases it has been suggested that you simply add a SerializationBinder which
We're building a commandline application that needs some data from the IIS server using
I'm writing a COM add-in for Word, Excel and PowerPoint. This add-in has some
The python interface to the memcache has an add method: add(key, value, time=0, min_compress_len=0,
Trolltech has released a tool called Visual Studio add-in for their LGPL and GPL
Ubuntu has 8 run levels (0-6 and S), I want to add the run
This has got to be something I just missed, but how do I add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.