(Windows) Jekyll commands don't work in Git Bash despite being in my path

I want to run Jekyll commands from Git Bash on Windows and am having some issues.

I installed Ruby and Jekyll using the instructions here. Everything works fine from the command prompt, but I realized I also needed to update my Git Bash path. So I did the following:

  1. In a Git Bash prompt, touch .bash_profile to create a profile.
  2. Open the profile with nano .bash_profile
  3. Add my Jekyll install path with:
    export PATH=$PATH:/c/Users/Username/AppData/Local/Microsoft/WindowsApps/jekyll/bin
  4. Save and exit nano, restart Git Bash, restart my computer.

No matter what I do, Jekyll -v in Git Bash gives me this:

/c/Users/Username/AppData/Local/Microsoft/WindowsApps/jekyll: line 6: /c/Users/Username/AppData/Local/Microsoft/WindowsApps/ruby: No such file or directory

Any thoughts on why this is happening? I checked my Git Bash profile and the path to Jekyll is successfully saved. I’m not sure what else to try. Thanks!

you’re sure that is where it is? any time I have seen it is in a gem folder inside a ruby folder. Not sure why it would be where you have it set.

I’m not using bash though so maybe this is ok. But even on linux or macs the path is always in a ruby directory.

I did confirm this by checking in Explorer. But even though nano saved the path correctly, it didn’t work.

What I ended up doing was probably quite excessive – I removed all my gems (and then Ruby itself) and then reinstalled from Git Bash instead of the command prompt. And then it just… worked fine.

I’m new to Ruby, so I can’t say I know why it worked, only that it did :slight_smile: