LoadError: cannot load such file — bcrypt_ext on Windows 2008 x64 server

前端 未结 9 1509
醉酒成梦
醉酒成梦 2020-12-30 04:32

I upgraded my environment from Ruby 2.0.0 to 2.2.3.

I also upgraded (overwrite) DevKit, and re-run ruby dk.rb install.

I removed Gemfile.lock and ran bundle

9条回答
  •  孤独总比滥情好
    2020-12-30 05:01

    I spent an entire hour fixing this, just now.

    Well what I did was I followed some advice online to do a

    gem install bcrypt --platform=ruby
    

    And then, it worked in irb.

    irb(main):001:0> require 'bcrypt'
    => true
    

    Later when I had to do a bundle install, for some odd reason rails installed another bcrypt and the error was back. So I had two folders in my gem root.

    bcrypt-3.1.10
    bcrypt-3.1.10-x64-mingw32
    

    So, since the first folder was the one that got built with the devkit, and it works. I deleted the contents of the second folder and copied the contents of the first into it.

    Seems to be working as I'm writing this.

提交回复
热议问题