bcrypt loading error in windows 10

前端 未结 4 1502
不思量自难忘°
不思量自难忘° 2021-01-16 12:39

now I am trying to install bcrypt in windows 10, but I got an loading error whenever running webrick server as the following.

C:/Ruby22-x64/lib/ruby/gems/2.2         


        
4条回答
  •  余生分开走
    2021-01-16 13:08

    It took me few hours to get this done but please feel free to share it.The root problem here is that ruby itself comes with bcrypt version 3.1.5 which is having bugs with the newer updates. However when you install or uninstall the bcrypt you are leving behind bcrypt-ruby which it always asks for first and hence all what you are doing won't go through so what to do ? 1- 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 
    

    In your Gemfile write

     gem 'bcrypt','~>3.1.11' 
    

    NOW as i write these lines the latest version is 3.1.11 but whatever version is updated just add it from their gem page. Run bundle install and it should work just fine.

提交回复
热议问题