3

Error

I have tried running the following command in git bash

rails g scaffold_controller oragnizationsController

And I get the error in the picture. I have tried multiple solutions:

1- Tried running

gem install wdm

2- Tried running

bundle install 

3- I have tried adding

gem 'wdm',  '~> 0.1.0'

and

gem 'wdm',  '~> 0.1.1'

since I read that 0.1.0 ain't working anymore. But the problem hasn't been solved yet. I am using windows 10, ruby 2.3.3, rails 5.1.4

Sayed Alesawy
  • 425
  • 2
  • 6
  • 18
  • Literally all I did was google the error message and click the first link: https://github.com/codahale/bcrypt-ruby/issues/142#issuecomment-252508115 – Tom Lord Nov 18 '17 at 22:07
  • I'd strongly suggest using a unix-based system rather than Windows for development, if at all possible. Developing on Windows is generally a pain; you'll run into lots of annoying issues like this. – Tom Lord Nov 18 '17 at 22:09

2 Answers2

1

Uninstall wdm gem and put it to the gemfile like this:

gem 'wdm' if Gem.win_platform?

Or like the error tells you

0

The message about wdm is misleading here. It seems to be just a notice/warning.

If you look closer, you'll see that the actual error message is printed in the line below that. It says:

cannot load such file -- bcrypt_ext (LoadError)

Then see here: Ruby on windows causes error Cannot load such file bcrypt_ext

Michał Szajbe
  • 8,830
  • 3
  • 33
  • 39