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
{{ message }}
Repository navigation
Ruby 2.2.2 on Windows - LoadError: cannot load such file -- bcrypt_ext #128
May be it is related to #126 as well.
When I try to require bcrypt:
irb(main):001:0> require 'bcrypt'
LoadError: cannot load such file -- bcrypt_ext
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.10-x64-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.10-x64-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from (irb):1
from C:/Ruby22-x64/bin/irb:11:in `<main>'
Even the downgrading to bcrypt (3.1.9 x64-mingw32) does not solve the issue :(. I suppose, the only solution would be to dowwgrade Ruby to 2.1.5? FYI, there is already Ruby 2.2.3 Windows installer available.
Try to install missed lib sudo apt-get install libgmp-dev libgmp3-dev
Reacted by SeongHoon Ryu, Alex Leung, Tony Vincent, SergeyGuzhvay, Phan Ngoc, Joseph Levarato, Trung Khong, changyu, Frank Fang, Luong Trung Kien and 16 more
Reacted by Franco Sinisi, Alex Leung, Trung Khong, Kyle, Yordis Prieto, ChrisKaun, Sergey Rubezhin, Chris Vilches, Satyabrat Bhol, BestRoosterBrazil and 3 more
Hello people,
I have with same error.
I installed devise, but happened the error when I try to do login.
bcrypt_ext load error
I did tried with bcrypt-ruby require bcrypt -> not work.
I did tried with bcrypt 3.1..7 and 3.1.9 and 3.1.10 -> not work.
I tried with many other ways, but not solved.
I used ruby 2.2.3 and rails 4.1.5, there are a way to workaround this?, I need the devise work with theses versions.
@dacochan doesn't seem to work. Windows 10 64 bit running Ruby 2.2.2
C:/Ruby22/lib/ruby/gems/2.2.0/gems/bcrypt-ruby-3.1.1.rc1-x86-mingw32/lib/bcrypt.rb:12:in `require': 126: The specified module could not be found.
- C:/Ruby22/lib/ruby/gems/2.2.0/gems/bcrypt-ruby-3.1.1.rc1-x86-mingw32/lib/bcrypt_ext.so (LoadError)
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands: gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install
I have Windows 10 64 bit running Ruby 2.2.2
Reacted by Gautam Chandna, Ben Shiundu, Sean Hulse, Alfonso Rodriguez, zhengkai2001, Joshua Ihejiamaizu, Z, Mehdi Yaghoubi, Myles Berueda, Momi22 and 22 more
Reacted by Sanjeev yadav, Robert Rappole, aarongertler, Bohdan, arvii, 宮沢ともか and Ivana Yael Currá
Reacted by Mehdi Yaghoubi and Sönke Ohls
Reacted by Prashant Omer and Alexsandr Borisov
Reacted by Alfonso Rodriguez, Joshua Ihejiamaizu, Z, Emil Kampp, Mehdi Yaghoubi, Suthan, Umesh Vyas and Alexsandr Borisov
I should have updated my comment before after I replied to the aforementioned post on stackoverflow. I'm not sure why (and don't have time right now to figure it out), but to fix it, I did:
I used this answer, but then make install put the resulting .so file in C:\Ruby22\lib\ruby\site_ruby\2.2.0\i386-msvcrt. The gem was not looking there for it, according the error message. So, I copied that manually to C:\Ruby22\lib\ruby\gems\2.2.0\gems\bcrypt-ruby-3.1.1.rc1-x86-mingw32\lib and it worked fine.
To: codahale/bcrypt-ruby bcrypt-ruby@noreply.github.com
Subject: Re: [bcrypt-ruby] Ruby 2.2.2 on Windows - LoadError: cannot load such file -- bcrypt_ext (#128)
Hello, here is my solution:
1. Firstly uninstall `bcrypt` and `bcrypt-ruby` by running these two commands:
`gem uninstall bcrypt` and `gem uninstall bcrypt-ruby`
2. Install it again with `gem install bcrypt --platform=ruby`
3. In your Gemfile write `gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'`
4. Run `bundle install`
I have Windows 10 64 bit running Ruby 2.2.2
Reply to this email directly or view it on GitHub: #128 (comment)
Also can you show me how to install ImageMagick and paperclip.
Sent from my T-Mobile 4G LTE Device
-------- Original message --------
From: Arnas Kromelis notifications@github.com
Date: 01/20/2016 4:16 PM (GMT-05:00)
To: codahale/bcrypt-ruby bcrypt-ruby@noreply.github.com
Subject: Re: [bcrypt-ruby] Ruby 2.2.2 on Windows - LoadError: cannot load such file -- bcrypt_ext (#128)
Hello, here is my solution:
1. Firstly uninstall `bcrypt` and `bcrypt-ruby` by running these two commands:
`gem uninstall bcrypt` and `gem uninstall bcrypt-ruby`
2. Install it again with `gem install bcrypt --platform=ruby`
3. In your Gemfile write `gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'`
4. Run `bundle install`
I have Windows 10 64 bit running Ruby 2.2.2
Reply to this email directly or view it on GitHub: #128 (comment)
+1, please fix the distributed version to build automatically.
Temporary solution for me was to uninstall all local bcrypt versions and reinstall using the MRI version with gem install bcrypt --platform=ruby, similar to arnaskro's comment.
@tjschuck I'm having this same issue with just having bcrypt (3.1.11 x64-mingw32) installed with Ruby 2.3.1
Just a little update I have to uninstall all bcrypt and then manually install it from the command line with gem install bcrypt --platform=ruby. If I try and use the bundle install with gem 'bcrypt', platforms: :ruby it installs bcrypt with versions in the lib but it doesn't include 2.3.
The issue I have should be with datamapper.
The dm-types depends upon bcrypt-ruby (~> 3.0)
but because I have a preinstalled bcrypt-ruby (3.1.5-x64-mingw32)
that relies on bcrypt (>= 3.1.3)
and I get a message after 'bundle install'
Post-install message from bcrypt-ruby:
The bcrypt-ruby gem has changed its name to just bcrypt. Instead of
installing bcrypt-ruby, you should install bcrypt. Please update your
dependencies accordingly.
Why should I go in and try to correct datamapper?
Tell them or suggest it. This is a rack app and it is getting like rails used to be.
Sorry! Didn't mean to rant. But I'm confused.
Windows won't allow the uninstall bcrypt, says:
ERROR: While executing gem ... (Gem::DependencyRemovalException)
Uninstallation aborted due to dependent gem(s)
still get same load issue :
cannot load such file -- bcrypt_ext
tried above suggestions, and others?
Confirmed this problem has reappeared for me with bcrypt (3.1.11 x64-mingw32), ruby 2.3.3, and Windows 10. Previous fix of gem uninstall bcrypt, gem install bcrypt --platform=ruby still works.
Reacted by Dalton Cole, Mark Meister, Fábio Gomes, Mateo Olarte Campo and Amit Joki
If anyone is still having issues with this (especially with devise) on Windows 64 bit, try installing Ruby 64 bit, then rails as a gem (rather than using the rails installer) and then add: gem 'bcrypt-ruby', '~> 3.0.0', :require => "bcrypt"
You may need to change your tzinfo-data gem to: gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
Activity
richpeck commentedon Nov 16, 2015
http://stackoverflow.com/a/33593911/1143732
belgoros commentedon Nov 16, 2015
Even the downgrading to
bcrypt (3.1.9 x64-mingw32)does not solve the issue :(. I suppose, the only solution would be to dowwgrade Ruby to2.1.5? FYI, there is alreadyRuby 2.2.3 Windows installeravailable.galaydaroman commentedon Nov 16, 2015
Try to install missed lib
sudo apt-get install libgmp-dev libgmp3-devbelgoros commentedon Nov 17, 2015
@galaydaroman: as I mentioned in the issue title, it was reproduced on a Windows PC😀
genivalvb commentedon Dec 9, 2015
Hello people,
I have with same error.
I installed devise, but happened the error when I try to do login.
bcrypt_ext load error
I did tried with bcrypt-ruby require bcrypt -> not work.
I did tried with bcrypt 3.1..7 and 3.1.9 and 3.1.10 -> not work.
I tried with many other ways, but not solved.
I used ruby 2.2.3 and rails 4.1.5, there are a way to workaround this?, I need the devise work with theses versions.
Thank you so advance,
genivalvb commentedon Dec 9, 2015
I am using Windows 7 and Ubuntu 15.10, but I need that this work in Windows 7 64 bits, with ruby 32bits running.
Require a version of bcrypt that works on Windows when needed
dacochan commentedon Jan 5, 2016
Iam use this,
gem 'bcrypt-ruby', '3.1.1.rc1', :require => 'bcrypt'
hut8 commentedon Jan 7, 2016
@dacochan doesn't seem to work. Windows 10 64 bit running Ruby 2.2.2
arnaskro commentedon Jan 20, 2016
Hello, here is my solution:
bcryptandbcrypt-rubyby running these two commands:gem uninstall bcryptandgem uninstall bcrypt-rubygem install bcrypt --platform=rubygem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'bundle installI have Windows 10 64 bit running Ruby 2.2.2
hut8 commentedon Jan 20, 2016
I should have updated my comment before after I replied to the aforementioned post on stackoverflow. I'm not sure why (and don't have time right now to figure it out), but to fix it, I did:
I used this answer, but then
make installput the resulting.sofile in C:\Ruby22\lib\ruby\site_ruby\2.2.0\i386-msvcrt. The gem was not looking there for it, according the error message. So, I copied that manually toC:\Ruby22\lib\ruby\gems\2.2.0\gems\bcrypt-ruby-3.1.1.rc1-x86-mingw32\liband it worked fine.cyaafi commentedon Jan 21, 2016
Thanks so much you save me from giving up
Sent from my T-Mobile 4G LTE Device
I have Windows 10 64 bit running Ruby 2.2.2
Reply to this email directly or view it on GitHub:
#128 (comment)
cyaafi commentedon Jan 21, 2016
Also can you show me how to install ImageMagick and paperclip.
Sent from my T-Mobile 4G LTE Device
I have Windows 10 64 bit running Ruby 2.2.2
Reply to this email directly or view it on GitHub:
#128 (comment)
zrisher commentedon Jan 23, 2016
+1, please fix the distributed version to build automatically.
Temporary solution for me was to uninstall all local bcrypt versions and reinstall using the MRI version with
gem install bcrypt --platform=ruby, similar to arnaskro's comment.jnslxndr commentedon Jan 25, 2016
+1 for a fix!
21 remaining items
dimanyc commentedon Mar 31, 2016
@tjschuck yep, 3.1.1 works like a charm. Thanks!
zrisher commentedon Mar 31, 2016
Confirmed working for me as well, thank you!
jostster commentedon Sep 15, 2016
@tjschuck I'm having this same issue with just having
bcrypt (3.1.11 x64-mingw32)installed with Ruby 2.3.1Just a little update I have to uninstall all bcrypt and then manually install it from the command line with
gem install bcrypt --platform=ruby. If I try and use thebundle installwithgem 'bcrypt', platforms: :rubyit installs bcrypt with versions in the lib but it doesn't include 2.3.rbcarlos commentedon Oct 22, 2016
@artdias90 Thank you! You helped a lot. None of other workarounds didn't work for me.
DouglasAllen commentedon Oct 25, 2016
Just a quick reminder for us Windows folk.
C:\Users>devkitvars
be sure you have that on the path.
DouglasAllen commentedon Oct 25, 2016
The issue I have should be with datamapper.
The dm-types depends upon bcrypt-ruby (~> 3.0)
but because I have a preinstalled bcrypt-ruby (3.1.5-x64-mingw32)
that relies on bcrypt (>= 3.1.3)
and I get a message after 'bundle install'
Post-install message from bcrypt-ruby:
#######################################################
The bcrypt-ruby gem has changed its name to just bcrypt. Instead of
installing
bcrypt-ruby, you should installbcrypt. Please update yourdependencies accordingly.
#######################################################
Why should I go in and try to correct datamapper?
Tell them or suggest it. This is a rack app and it is getting like rails used to be.
Sorry! Didn't mean to rant. But I'm confused.
acrolink commentedon Nov 30, 2016
@artdias90 Thank you very much.
FollyHermann commentedon Feb 10, 2017
hello there
big up to you @artdias90
I have just tried your solution and it is working perfect.
Thank for sharing.
Rappole4 commentedon Feb 28, 2017
Windows won't allow the uninstall bcrypt, says:
ERROR: While executing gem ... (Gem::DependencyRemovalException)
Uninstallation aborted due to dependent gem(s)
still get same load issue :
cannot load such file -- bcrypt_ext
tried above suggestions, and others?
zrisher commentedon Mar 28, 2017
Confirmed this problem has reappeared for me with
bcrypt (3.1.11 x64-mingw32),ruby 2.3.3, and Windows 10. Previous fix ofgem uninstall bcrypt,gem install bcrypt --platform=rubystill works.AnwarShah commentedon Apr 30, 2017
Only @marcomd's solution of compiling the gem worked.
dharmesh-khandelwal commentedon May 5, 2017
@marcomd You saved me! Compiling bcrypt worked in windows 10. Just had to change bcrypt version to 3.1.11.
Gary336 commentedon Jun 2, 2017
I can confirm that
gem uninstall bcryptfollowed bygem install bcrypt --platform=rubyworked for me today on Windows 10 64 bit.Gary336 commentedon Jul 7, 2017
baladkb commentedon Jun 3, 2019
thanks!