Skip to content

Problem with location in which gem install by default #395

Open

Description

@janohirmas

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?

Activity

  1. mohits commented on Oct 25, 2024

    @mohits
    Collaborator

    Can you try Windows command shell?

  2. MSP-Greg commented on Oct 25, 2024

    @MSP-Greg
    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.

  3. larskanis commented on Oct 25, 2024

    @larskanis
    Member

    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

  4. janohirmas commented on Oct 26, 2024

    @janohirmas
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions