1

I've almost given up , after trying countless solutions , nothing has worked for me till now. I'm running Ruby 2.3.3 and rails 4.2.8 on windows 10 64-bit I've installed Ruby , Rails and DevKit using Rails Installer. I installed bcrypt v 3.1.7 ( to avoid compatibility issues )

gem list bcrypt

* LOCAL GEMS *

bcrypt (3.1.7 x86-mingw32)

I run rake db:migrate ( I have a few seeds ) and get this -

enter image description here

I've tried a lot of solutions. The most popular being uninstalling bcrypt and installing bcrypt in this manner - "gem install bcrypt --platform=ruby" But when I try to do that, I get this error -

enter image description here

I've also tried navigating to the folder where the gem is installed and running -

ruby extconf.rb

But that gives me a bunch of errors basically saying " You need to install Development Tools first" But Devkit has been installed by RailsInstaller. Even after I navigate to Devkit folder and run following commands I get an error -

enter image description here

So I add my Ruby root directory to config.yml - C:\RailsInstaller\Ruby2.3.3 and get following error -

enter image description here

This leads me to believe that DevKit tools have been installed but I still get an error saying that they need to be installed when I run ruby extconf.rb

I just want to get bcrypt running on my machine , any ideas what can I do ?

Mihir Deshpande
  • 105
  • 2
  • 2
  • 5
  • 1
    First things first: please fix your question by removing any images. Instead, paste the text from your console into the question so that if your image host deletes the images, your question still makes sense. Remember that Stack Overflow is a resource used by many over time, not just free dev help for you alone. – MarsAtomic Feb 01 '18 at 15:43
  • Sorry mate , I don't have those lines available since I fixed the problem but I'll transcribe the text from the image asap – Mihir Deshpande Feb 01 '18 at 16:03

1 Answers1

0

Try fixing your gemfile. You're working in a 64 bit operating system, but you've specified a 32 bit version of bcrypt in your gemfile:

bcrypt (3.1.7 x86-mingw32)

This notation leads to a cascade of problems because bcrypt wants to install 32 bit dependencies (psych) as well.

Specify the 64 bit version of bcrypt in your gemfile and see what happens:

bcrypt (3.1.7-x64-mingw32)

Then run:

bundle install

You should be in good shape from there on out. I'm not sure, since I'm too lazy to boot into Windows at the moment, but I think you can probably get away with not specifying a version of bcrypt at all, and letting bundler figure it out by itself based on your platform.

MarsAtomic
  • 10,436
  • 5
  • 35
  • 56
  • I tried that too but bundler would just forcably install the x86 version too. I did manage to fix it though by simply doing "gem uninstall psych". What that did was uninstalled the current version 3.0.2 which was causing the the dependency error and installed the default version of psych ( since its a default gem ) which was 2.0.1. That allowed me to run "gem install bcrypt --platform=ruby" which installed only the 64 bit version and basically resolved all conflicts. – Mihir Deshpande Feb 01 '18 at 16:05
  • @MihirDeshpande Did you install the latest version of psych manually at some point? – MarsAtomic Feb 01 '18 at 16:30
  • It's a bit muddled actually. I installed all the latest version of Ruby and Rails 5 via RailsInstaller but then I had some older rails apps I needed to work with which were only compatible with rails 4 so I manually downgraded Rails 5 to Rails 4. – Mihir Deshpande Feb 02 '18 at 14:01