oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
644 stars 248 forks source link

Jekyll installation (not recognized as the name of a cmdlet, function ...) #345

Closed Andrewp2 closed 8 months ago

Andrewp2 commented 1 year ago

What problems are you experiencing?

Steps to reproduce

I was taking the steps here: https://jekyllrb.com/docs/installation/windows/

  1. I installed Ruby+Devkit version, newest version.
  2. I let the installation wizard run ridk install, and chose MSYS2 and MINGW development tool chain.
  3. I opened a new Windows Terminal, and ran gem install jekyll bundler
  4. jekyll -v returns:
jekyll -v
jekyll : The term 'jekyll' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ jekyll -v
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (jekyll:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

What's the output from ridk version?

PS C:\Users\andre\code\andrewp2.github.io> ridk version
bash.exe: warning: could not find /tmp, please create!
---
ruby:
  path: C:/Ruby32-x64
  version: 3.2.2
  platform: x64-mingw-ucrt
ruby_installer:
  package_version: 3.2.2-1
  git_commit: 83df213
msys2:
  path: C:\Ruby32-x64\msys64
cc: gcc (Rev10, Built by MSYS2 project) 12.2.0
sh: GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)
os: Microsoft Windows [Version 10.0.19045.3086]

As far as I can tell I have ruby installed correctly:

PS C:\Users\andre\code\andrewp2.github.io> ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]

Executing jekyll doesn't work when specifying ridk:

PS C:\Users\andre\code\andrewp2.github.io> ridk exec jekyll -v
'jekyll' is not recognized as an internal or external command,
operable program or batch file.
Andrewp2 commented 1 year ago

I think I got it fixed?

I added my bin to my personal user $PATH environment variable, that is C:\Ruby32-x64\bin, and I redid ridk install inside of terminal with elevated privileges. I think the installation there must've been going wrong somehow, because afterwards I just did gem uninstall --all and reinstalled jekyll and it was installed.

mohits commented 8 months ago

hi @Andrewp2 - do you think we should close this item or is there further clarification/ discussion needed? I will close this if we don't hear back by 27th October. Thanks!

mohits commented 8 months ago

Closing this since there is no response.