Issue with bundler under Windows Subsystem for Linux

I’m testing under WSL and have an issue with bundler. I’ve done a gem install on both Jekyll and Bundler. When I ran jekyll new foo, I get:

Running bundle install in /home/ray/jekyll1...
  Bundler: ruby: No such file or directory -- /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError)

I can confirm that there is no /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle directory. When I do whereis bundler I see: bundler: /usr/local/bin/bundler /mnt/c/tools/ruby23/bin/bundler /mnt/c/tools/ruby23/bin/bundler.bat.

So it appears to have installed, but not as a gem, or not in the proper gem folder I guess?

I came back to trying this again and still have the same issue - anyone know what to do?

So I got it working - but I don’t know how. I found that while /usr/lob/ruby/gems/2.3.0/gems did NOT have bundle, I did have it at /var/lib/gems/2.3.0/bundler-1.16.1/. So I copied the bundle executable from there over /usr/local/bin’s copy and it works now. Any idea how this happened?

Except no - making a new site still gives:

Running bundle install in /mnt/c/Users/ray/Dropbox/projects/raymondcamden2018/jekyllsite3...
  Bundler: ruby: No such file or directory -- /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError)

no idea, but have you tried just using the regular windows command prompt or powershell? I use them and have no problems.

I’m guessing you have 2 versions of ruby installed and it sounds like it is confused - but I am not so good at that type of thing and am not much of a linux user.

I did try but I was never able to get Jekyll 3.7.3 installed in PowerShell - just 3.6.something. :\

ah ha - I see what you mean. I just tried to install the latest jekyll and got an error. I’m guessing this is a ruby problem.

I just re-installed ruby and now it worked - I’m guessing you need devkit and probably don’t have that.