You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bcrypt stoped working for everything i am using in my app, in my case gems like Devise and Friendly_id are dependant of bcrypt, and them are not working anymore.
For the purpose of showing the error to you, i just create a new app named pr, uncomment the Gemfile line
gem'bcrypt','~> 3.1.7'
Then run command
bundleinstall
And trying to start the server
railss
It explodes bad time! With the error
C:/Ruby21/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
I don't know but this is very strange. Whenever i mentioned following code in my Gemfile rails server stops working and when I comment the code it is working. I tried installing , updating and everything but bcrypt seems to be not working for me.
The code that I mentioned in the gem file is as follows:
gem 'bcrypt', '~> 3.1.9'
If I comment or delete the above line then "rails s" command is working.
I am using devise for authentication but when I entered username and password i get "LoadError in Devise::SessionsController#create" error in the web console in the rails server log I get "LoadError (cannot load such file -- bcrypt_ext):" error. Following is the screenshot of the error.
@pranjal815 this is a quite old ticket, you're not very likely to get help in those cases. I would always open a new ticket unless it's very much the same thing. Also, this would be better suited for Stackoverflow's Q&A Style questions rather than GitHubs Issues.
Try adding '3.1.9' with no ~> to your Gemfile, this will freeze it to a specific version. Then do a bundle install.
Right now, you're running bcrypt 3.1.11 which may or may not be broken again. (you can tell from the path in your stacktrace, 5th and 6th line).
The leading ~> gives bundler some leeway in choosing a version for you. This is described in the bundler docs.
Reacted by cfkwok, Jose Rafael Camejo, Zafranudin Zafrin, michael wise, Edu, Andrew Backes, Hasan Zahid, Aria, thanhmagia, farzam7777 and 17 more
Reacted by cfkwok, farzam7777, DanielDiamanto, Saujan Ghimire, greg620, Brian Biggers and adamtanczos
Reacted by cfkwok, Zafranudin Zafrin, Edu, Think4866, farzam7777, DanielDiamanto, Saujan Ghimire, Brian Biggers, Francisco Bach, adamtanczos and 1 more
Reacted by cfkwok, Edu, Andrew Backes, farzam7777, DanielDiamanto, Saujan Ghimire, Brian Biggers, Douglas Harrington Muhone and adamtanczos
@ladyruby723 I made an account just to thank you. I'm going through Lynda.com's Ruby Course on Windows 7 and bcrypt wasn't working at all. Just using the latest version of bcrypt made it so I couldn't use the rails server, couldn't create users in the console, nothing. So I googled around like crazy for over 3 hours and tried all the different "solutions" like changing the platform to ruby, using a different version, blah blah blah. But no matter what I did, the password_digest would never work. I could add a password but it wouldn't encrypt it. UNTIL I did what you said. I uninstalled all the bcrypt and bcyrpt-ruby gems and then added the line you provided into the gemfile and then ran bundle install and holy crap, everything worked after that. So again, thank you so much for putting this here. For whatever reason it seems the github version is happy on my windows machine. WOOT!
Reacted by Claudius Coenen, cfkwok, Kate Richardson, Edu, Stefano, Brian Biggers and Sheryar Ahmed
I sympathise with everyone who has problems. I really do. I had my fair share myself. This ticket is not the place to get your issues fixed. Open a new ticket with your specific problem or post them to stackoverflow.
For one thing: this ticket is closed. Sadly, Github only shows this at the very top of the ticket, not at the place where you're likely to start reading. It only gets attention from people who are for some reason still subscribed to it. The developers very likely don't monitor closed tickets.
Another reason, why this is the wrong ticket: It is also about a different topic for the most part. At the very least because the versions are different. Probably also because your version of ruby today is not the same it was three years ago.
The Third reason is this: the devs don't see your problem (for the reasons above), so they can't acknowledge that bcrypt is one of the major stumbling blocks for ruby (on rails) newcomers. I've been lucky enough to be instructor in four different Ruby beginners events. A large portion of the participants are windows users. Pretty much all of them run into problems like yours. This will only get fixed if these problems are reported. Every new problem deserves a new ticket.
Activity
tjschuck commentedon Oct 23, 2014
3.1.7 is not built with support for Ruby 2.1 on Windows. I'm building 3.1.8 now and should have it pushed up shortly.
miguelpeniche commentedon Oct 23, 2014
@tjschuck glad you can help me, i am on a trip, and the only laptop i have is Windows. Thanks for the contribution.
tjschuck commentedon Oct 23, 2014
@mickeycinema I just pushed version 3.1.8 to RubyGems. Can you please confirm that it works for you? Thanks!
miguelpeniche commentedon Oct 23, 2014
Still not working :/, i did the same steps as the start, with a new app called
brcyptapp, but now updated the lineHere is the screenshot:
tjschuck commentedon Oct 23, 2014
@mickeycinema Ugh, sorry. Give 3.1.9 a try...
miguelpeniche commentedon Oct 23, 2014
Now everything is working like a charm with bcrypt 3.1.9!
May i reopen this issue if i see any bug?
Thanks a lot for your help.
tjschuck commentedon Oct 23, 2014
@mickeycinema If it seems related, sure -- comment back on this issue. If it's unrelated, feel free to open a new issue.
Thanks!
gilbertc77 commentedon May 18, 2015
Got some error related to bcrypt when running rails s on win8.1 64bit, ruby 2.2.2, rails 4.2.1

ccoenen commentedon Jul 1, 2015
(sorry, just saw #116, adding my voice there)
pranjal815 commentedon Feb 21, 2017
I don't know but this is very strange. Whenever i mentioned following code in my Gemfile rails server stops working and when I comment the code it is working. I tried installing , updating and everything but bcrypt seems to be not working for me.
The code that I mentioned in the gem file is as follows:
gem 'bcrypt', '~> 3.1.9'
If I comment or delete the above line then "rails s" command is working.
I am using devise for authentication but when I entered username and password i get "LoadError in Devise::SessionsController#create" error in the web console in the rails server log I get "LoadError (cannot load such file -- bcrypt_ext):" error. Following is the screenshot of the error.

ccoenen commentedon Feb 21, 2017
@pranjal815 this is a quite old ticket, you're not very likely to get help in those cases. I would always open a new ticket unless it's very much the same thing. Also, this would be better suited for Stackoverflow's Q&A Style questions rather than GitHubs Issues.
Try adding
'3.1.9'with no~>to yourGemfile, this will freeze it to a specific version. Then do abundle install.Right now, you're running bcrypt 3.1.11 which may or may not be broken again. (you can tell from the path in your stacktrace, 5th and 6th line).
The leading
~>gives bundler some leeway in choosing a version for you. This is described in the bundler docs.ladyruby723 commentedon Mar 4, 2017
@pranjal815 I had a very similar issue, and adding the github version of bcrypt to my Gemfile seemed to fix the problem. :)
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
dafeed commentedon Mar 13, 2017
@ladyruby723 I made an account just to thank you. I'm going through Lynda.com's Ruby Course on Windows 7 and bcrypt wasn't working at all. Just using the latest version of bcrypt made it so I couldn't use the rails server, couldn't create users in the console, nothing. So I googled around like crazy for over 3 hours and tried all the different "solutions" like changing the platform to ruby, using a different version, blah blah blah. But no matter what I did, the password_digest would never work. I could add a password but it wouldn't encrypt it. UNTIL I did what you said. I uninstalled all the bcrypt and bcyrpt-ruby gems and then added the line you provided into the gemfile and then ran bundle install and holy crap, everything worked after that. So again, thank you so much for putting this here. For whatever reason it seems the github version is happy on my windows machine. WOOT!
cfkwok commentedon Mar 14, 2017
@ladyruby723 Thank you sooo much!!! I was about to dual boot Linux here...
ericremer commentedon Mar 15, 2017
@ladyruby723 Thank you... everything else failed, but your solution worked!
TheHeavenlyDao commentedon Mar 19, 2017
@ladyruby723 THANK YOU! I've been looking for a solution for so long, but your solution worked! Thank you very much!
gaumondia commentedon Mar 19, 2017
@ladyruby723 THANK YOU!! I got an error at first but then realized I had to install https://git-scm.com/downloads before. Worked like a charm! :)
ccoenen commentedon Mar 19, 2017
I sympathise with everyone who has problems. I really do. I had my fair share myself. This ticket is not the place to get your issues fixed. Open a new ticket with your specific problem or post them to stackoverflow.
For one thing: this ticket is closed. Sadly, Github only shows this at the very top of the ticket, not at the place where you're likely to start reading. It only gets attention from people who are for some reason still subscribed to it. The developers very likely don't monitor closed tickets.
Another reason, why this is the wrong ticket: It is also about a different topic for the most part. At the very least because the versions are different. Probably also because your version of ruby today is not the same it was three years ago.
The Third reason is this: the devs don't see your problem (for the reasons above), so they can't acknowledge that bcrypt is one of the major stumbling blocks for ruby (on rails) newcomers. I've been lucky enough to be instructor in four different Ruby beginners events. A large portion of the participants are windows users. Pretty much all of them run into problems like yours. This will only get fixed if these problems are reported. Every new problem deserves a new ticket.
farzam7777 commentedon Jun 21, 2017
@ladyruby723 Thank you so much. Your solution worked for me.
steph1793 commentedon Jul 16, 2017
Thank you a lot @ladyruby723 . It also worked for me after 7 hours trying to fix this.
franbach commentedon Nov 28, 2017
Thank you! @ladyruby723
Ryanrj commentedon Jan 23, 2018
@ladyruby723 Thank you!!
ksb777 commentedon Jan 24, 2018
I think nobody can solve this problem.......I did everything to solve this problem but bcrypt's issue is not solved.
damn issue.