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

妖精的绣舞 提交于 2019-12-02 04:40:54

I've faced this issue recently (as have many others). As per ladyruby723 posted here, use gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt' in your gemfile file.

I solved this the same problem by the following line:

gem 'bcrypt-ruby', '~> 3.1.2'

Finally... Got it working.. Didn't understand exact issue but I made two important changes. I'm not sure which change made it working.. 1. I uninstalled my old ruby & rails that was installed from railsinstaller. Installed just ruby for my OS (64 bit which i was not able to choose while installing from railsinstaller). Then I installed rails, sqlite3 separately. 2. Another important change I did is in GemFile.lock . I think this did the trick. I kept both of following lines

bcrypt-ruby (3.0.0)
bcrypt-ruby (3.0.0-x86-mingw32)
KnownColor

I believe this exact issue is solved in another question. There are actually two error messages produced, this being the higher level one, by searching for the lower level I found the below answer.

can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1. Make sure all dependencies are added to Gemfile

add below in gem file

gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'

and run bundle install and restart server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!