1

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:

  1. uninstall all bcrypt gem versions with gem uninstall bcrypt and select option 3 (if exist);
  2. gem uninstall bcrypt-ruby and select option 3 (if exist);
  3. install bcrypt using gem install bcrypt --platform=ruby;
  4. add this line gem 'bcrypt', platforms: :ruby to Gemfile.

And I thinks it works, because Devise depends on BCrypt and Devise works fine.

The problem is when I use Byebug and use in the console BCrypt, I am getting an error:

NameError Exception: uninitialized constant users::PasswordsController::BCrypt

This is where it is byebug:

def edit
  byebug
end

It is in the controller which inherits from Devise::PasswordsController and it just show the view.

For the example, if I type: BCrypt::Engine.generate_salt, I am getting that error.

4

0 回答 0