Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with location in which gem install by default #395

Open
janohirmas opened this issue Oct 25, 2024 · 4 comments
Open

Problem with location in which gem install by default #395

janohirmas opened this issue Oct 25, 2024 · 4 comments

Comments

@janohirmas
Copy link

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
Copy link
Collaborator

mohits commented Oct 25, 2024

Can you try Windows command shell?

@MSP-Greg
Copy link
Contributor

@janohirmas

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.

@larskanis
Copy link
Member

larskanis commented Oct 25, 2024

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
Copy link
Author

janohirmas commented Oct 26, 2024

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:

  • RUBYGEMS VERSION: 3.5.16
  • RUBY VERSION: 3.3.5 (2024-09-03 patchlevel 100) [x64-mingw-ucrt]
  • INSTALLATION DIRECTORY: C:/RubyGems
  • USER INSTALLATION DIRECTORY: C:/Users/XXX/.local/share/gem/ruby/3.3.0
  • RUBY EXECUTABLE: C:/Ruby33-x64/bin/ruby.exe
  • GIT EXECUTABLE: C:\Program Files\Git\mingw64\bin/git.EXE
  • EXECUTABLE DIRECTORY: C:/RubyGems/bin
  • SPEC CACHE DIRECTORY: C:/Users/XXX/.cache/gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  • RUBYGEMS PLATFORMS:
    • ruby
    • x64-mingw-ucrt
  • GEM PATHS:
    • C:/RubyGems
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => true
    • :bulk_threshold => 1000
    • "# Feel free to add any rubygems config options as described on" => nil
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\Users\XXX\bin
    • C:\Program Files\Git\mingw64\bin
    • C:\Program Files\Git\usr\local\bin
    • C:\Program Files\Git\usr\bin
    • C:\Program Files\Git\usr\bin
    • C:\Program Files\Git\mingw64\bin
    • C:\Program Files\Git\usr\bin
    • C:\Users\XXX\bin
    • C:\Windows\system32
    • C:\Windows
    • C:\Windows\System32\Wbem
    • C:\Windows\System32\WindowsPowerShell\v1.0
    • C:\Windows\System32\OpenSSH
    • C:\Program Files\dotnet
    • C:\Program Files\Git\cmd
    • C:\Users\XXX\AppData\Local\Programs\Python\Python313
    • C:\Ruby33-x64\bin
    • C:\Users\XXX\AppData\Local\Programs\Python\Python313\Scripts
    • C:\Users\XXX\AppData\Local\Programs\Python\Python313
    • C:\Users\XXX\AppData\Local\Programs\Python\Launcher
    • C:\Users\XXX\AppData\Local\Microsoft\WindowsApps
    • C:\Users\XXX\AppData\Local\Programs\Microsoft VS Code\bin
    • C:\Users\XXX\AppData\Local\Programs\Python\Python313
    • C:\Program Files\Git\usr\bin\vendor_perl
    • C:\Program Files\Git\usr\bin\core_perl
    • C:\RubyGems\bin
    • C:\RubyGems\bin

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants