Newbie problems with wdm errors

Hi folks.

I am new to Ruby and Jekyll but generally tech savvy.
Im running Windows 11.

Trying to create a new Jekyll site. I followed all the steps in the docs (some problems accessing Jekyll, resolved by editing Windows path and rebooting)

In VSCODE, I ran

gem install jekyll bundler

which ran with no faults.

I then tried to create a new jekyll site with

jekyll new mysite

(In VSCODE also but see below)

This reported the error error occurred while installing wdm (0.1.1), and Bundler cannot continue
I’ve looked at various solutions to this - since I am new to Ruby I haven’t gone into any of its internals.

I then ran

 bundle install

This reported Gem::Ext::BuildError: ERROR: Failed to build gem native extension. with quite extensive diagnostics

I then ran

gem install wdm

This gave the same diagnostics. At the end it states

Gem files will remain installed in C:/Users/afree/.local/share/gem/ruby/3.3.0/gems/wdm-0.1.1 for inspection.  
Results logged to C:/Users/afree/.local/share/gem/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/wdm-0.1.1/gem_make.out

I’ve gone through most of these steps also outside VScode, in both cmd and powershell

This must be a common problem, though I haven’t yet found previous answers to it. Probably something trivial but I’m stuck, and if I am, others must be also.

All suggestions welcome.

usually this is cause you don’t have the ruby dev tools installed - when you installed ruby you probably did the one without the dev kit. Try uninstalling it and re-installing it with the devkit.

@rydar: yes, I saw that this could be a problem. I went through a number of attempts to fix the installation but I’ll try again. If I remember right, I didn’t do an uninstall first, just re-installed. But I answered the install questions differently. I will try a complete uninstall, reinstall, reboot and take note of the options I used…

Here is the solution, discovered by trial and error.

In the file called ‘gemfile’ in the jekyll directory, there is the following line:

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

Removing this line removes the problem

So it’s to do with the WDM ‘watch’ service. But this is inessential, so it functions without it.

The docs suggest substituting a slightly different line which I think is intended to do the same thing. It doesn’t work either.

Should I perhaps raise a query about the fact that WDM doesn’t function?

2 Likes

Thanks! I had the same problem, and removing the line in the gemfile worked for me too.
I used the guide on GitHub (Creating a GitHub Pages site with Jekyll) and i have never used Ruby before so everything was installed for the first time.