Issue with bundler under Windows Subsystem for Linux


#1

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?


#2

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


#3

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?


#4

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)

#5

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.


#6

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


#7

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.


#8

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