oneclick / rubyinstaller2

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

Problem with location in which gem install by default #395

Open janohirmas opened 1 week ago

janohirmas commented 1 week ago

What problems are you experiencing?

I cannot execute jekyll from by Bash terminal

Steps to reproduce

I followed the instructions from the website. Everything is installed, but when I type: $ jekyll -v /c/Users/username/AppData/Local/Microsoft/WindowsApps/jekyll: line 6: /c/Users/username/AppData/Local/Microsoft/WindowsApps/ruby: No such file or directory

Then I type: $ where jekyll C:\Users\username\AppData\Local\Microsoft\WindowsApps\jekyll C:\Users\username\AppData\Local\Microsoft\WindowsApps\jekyll.bat

What's the output from ridk version?

mohits commented 1 week ago

Can you try Windows command shell?

MSP-Greg commented 1 week ago

@janohirmas

This may be an issue with RubyGems. Can you post:

I noticed some problems locally, but I have a 'unique' windows setup.

larskanis commented 1 week ago

You probably installed in multi-user-mode. This can make gem installs more difficult. Unless you really want to work with multiple users, you should install in single user mode.

See https://github.com/oneclick/rubyinstaller2/wiki/FAQ#user-content-install-mode

janohirmas commented 6 days ago

This may be an issue with RubyGems. Can you post:

  • output from gem env using a bash shell?
  • contents of C:\Users\username\AppData\Local\Microsoft\WindowsApps\jekyll

I noticed some problems locally, but I have a 'unique' windows setup.

@MSP-Greg, the gem env: RubyGems Environment:

I managed to fully uninstall Ruby, and to install it for the user, as @larskanis suggested. Now jekyll is in ruby gems: $ where jekyll C:\RubyGems\bin\jekyll C:\RubyGems\bin\jekyll.bat

But I still get this output: $ jekyll -v /c/RubyGems/bin/jekyll: line 6: /c/RubyGems/bin/ruby: No such file or directory

It is worth noting that if I run jekyll via Ruby it works:
$ ruby -S jekyll -v jekyll 4.3.4

Also $ ruby -S jekyll serve works