| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
I solve it with uninstall all bcrypt gem versions with gem uninstall bcrypt and select option 3 (if exist) and uninstall all bcrypt-ruby gem versions with gem uninstall bcrypt-ruby and select option 3 (if exist) then install bcrypt using gem install bcrypt --platform=ruby then add this line gem 'bcrypt', platforms: :ruby to Gemfile, that is it :D.
no meu caso, eu desinstalei todas as versões do bcrypt , com gem uninstall bcrypt e seleciona opção 3 (se existir) e desisntalei todas as versões do bcrypt-ruby gem com gem uninstall bcrypt-ruby e seleciona opção 3 (se existir), depois instalei o bcrypt usando gem install bcrypt --platform=ruby e adicionei esta linha gem 'bcrypt', '~> 3.1.7' no Gemfile. Funcionou certinho.
In my case, I uninstalled all versions of bcrypt, with gem uninstall bcrypt and select option 3 (if it exists), and uninstalled all versions of bcrypt-ruby gem with gem uninstall bcrypt-ruby and select option 3 (if it exists), then I installed bcrypt using gem install bcrypt --platform = ruby and I added this line gem 'bcrypt', '~> 3.1.7' in Gemfile. It worked right.
I also solved this by uninstalling bcrypt and re-installing it using the --platform=ruby parameter, but here follows a command to remove the gems that depend on bcrypt in case anyone runs into the same problem as me (gem Uninstallation aborted due to dependent gem(s)):
gem list bcrypt | cut -d" " -f1 | xargs gem uninstall -aIx
Thank you so much finally, something worked, but what was the issue causing it?
Thank you so much @AliOsm I finally able to resolve the issue.
As shown in #102 (comment), pointing the gemfile to the git repo seems to be working nowadays. That is, gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
edit Sept 2017: It is probably better to follow #142 (comment) (stonewallthomas, just below me). Is bcrypt-ruby dilapidated?
Gees, thank you so much. I spent over an hour on this yesterday, and this actually worked! I followed so many bogus procedures in different forums. It was this simple for me:
I have Windows 7 64, Ruby 2.3.3, Rails 5.0.2
I did this in terminal in my project root:
gem uninstall bcrypt-ruby
gem uninstall bcrypt
gem install bcrypt --platform=ruby
Then added this to my Gemfile:
gem 'bcrypt', '~> 3.1.11'
And of course:
bundle install
@naiguelsantos Thank you man, you saved my life, although I had to delete the Gemfile.lock before running the codes you said, but after all it worked.
Hi @codahale - since this issue appears to be resolved in master, could you please release an update to rubygems? Looks like the last public release was in 2014
Tried almost everything here and nada. I stumbled on https://stackoverflow.com/questions/33588735/loaderror-cannot-load-such-file-bcrypt-ext-on-windows-2008-x64-server and the first answer (answer with most votes) solved it!
thank you a lot Mr.@stonewallthomas your solutions is work on me
Thanks stonewallthomas and gregkin
This isnt work for me also
rails s
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in require': cannot load such file -- bcrypt_ext (LoadError) from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in <top (required)>' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in block (2 levels) in require' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in block in require' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in require' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in require'
from C:/Sites/stukdo/config/application.rb:7:in <top (required)>' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in block in perform' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in tap'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in perform' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in perform' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in invoke'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in <top (required)>' from bin/rails:4:in require'
from bin/rails:4:in `
Bcrypt team, please fix this issue
@luislavena is this something you could help with?
@johnnyshields I'm no longer involved with RubyInstaller or Ruby for Windows, however the error is caused by the gem lacking binaries for newer versions of Ruby.
While you can manually force to recompile (gem install bcrypt --platform=ruby), Bundler might not be friendly and will always try to install the binary version instead.
@larskanis has helped other projects get better support of newer Rubies on several projects and might be able to provide some up-to-date instructions or pointers on what will be required on your end.
From the get go, this might need a new release of the gem.
Hope that helps.
Cheers.
@luislavena thank you that's very helpful. @larskanis or someone from this project can you please help?
Hello,
Its solve for me with step is below :
@wallwood they need to bundle new binaries with the gem for windows. then these steps won't be needed.
Thanks @luislavena for the invitation!
As far as I remember bcrypt builds fine with any RubyInstaller version, provided that DevKit is present. So you can either use
gem install bcrypt --platform=ruby
or if you're using a Gemfile than
gem "bcrypt", git: "https://github.com/codahale/bcrypt-ruby/"
Years ago I proposed #117, which would provide updated fat binary Windows gems, but to be honest, it's probably best to drop these platform specific gem versions entirely and release a platform "ruby" gem only at the next version. This always requires to have DevKit installed, but the Ruby+DevKit version is by far the most downloaded RubyInstaller flavor anyways.
This way Windows is no longer treated as a special case, which requires new releases for every new ruby version, but behaves as on all other operating systems.
I would agree it would be best to drop the platform specific versions, as everyone on windows has devkit. Can a gem maintainer help with this?
I have just pushed version 3.1.12.rc1 to RubyGems.org which should solve this problem.
Can someone please confirm that gem install bcrypt --prerelease now works on Windows? If so, I'll push out the final version.
@tjschuck I tested bcrypt-3.1.12.rc1 successfully on Ruby-2.5.1-x64. However it still fails with cannot load such file -- bcrypt_ext on Ruby-2.6. This is why I think it's better to no longer release fat binary gems.
Version 3.1.12 of the bcrypt gem, which should fix this issue, was just pushed to RubyGems.
You should now be able to gem install bcrypt on Windows with none of the above workarounds.
Thanks, everyone!
@cahyowhy 我跟你报一样的错误,请问您最终是如何解决的?
In my case, I uninstalled all versions of bcrypt, with gem uninstall bcrypt and select option 3 (if it exists), and uninstalled all versions of bcrypt-ruby gem with gem uninstall bcrypt-ruby and select option 3 (if it exists), then I installed bcrypt using gem install bcrypt --platform = ruby and I added this line gem 'bcrypt', '~> 3.1.7' in Gemfile. It worked right.
You saved me! ![]()
| Back | FazBrowse Home | New Git URL |
Bcrypt stoped working for everything i am using in my app, in my case gems like Devise 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 test-a, uncomment the Gemfile line
Then run command
And trying to start the server
It explodes bad time! With the error
This is the screenshot
I am using the next:
Hope there is some fix for this issue soon.