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 install to start with a brand new environment. Everything looks ok, but I get the error:
E:\Projects\development\Stairs>rake db:migrate
rake aborted!
LoadError: cannot load such file -- bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- 2.2/bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
I first had the same issue with Nokogiri, which I solved using this solution : Nokogiri load error using Juloi Elixir's solution and installing Nokogiri from a local copy.
But I don't feel like doing this foreach gem! It looks like ruby is searching the gem using a ./ or ./2.2 path, while gems are stored in a ./2.2.0 path. Is this configurable? How can I solve this issue?
Note: Gemfile contains gem 'bcrypt', '~> 3.1.10'
Thanks!
Here is the solution worked for me:
This process is for windows:
The problem is with the programs installed on the system.
Uninstall all rails programs:
All Ruby programs.
RailsInstaller.
Removes all files that have been able to uninstall, you have to do it manually inside:
C:\RailsInstaller
http://railsinstaller.org/en
Wait a moment and it's already to go.
MarlonJon.es
Solution was here: bcrypt-ruby@github:
Rebuild locally the bcrypt gem:
Note that this works only if your DevKit environment is correctly setup (run devkitvars.bat).
What worked for me on Windows 7:
gem uninstall bcrypt
to uninstall all versions of bcrypt, including those listed as dependenciesgem install bcrypt
to reinstallbundle install
In my case, a designating of the old version to bcrypt in
Gemfile
was a cause of the error. I removed a designating of the version and runbundle update bcrypt
, then it was settled.I spent an entire hour fixing this, just now.
Well what I did was I followed some advice online to do a
And then, it worked in irb.
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.
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.