Skip to content

[Bug]: ridk install error UTF-8 German computer scoop prefix msys2 #7717

@Dorirrst

Description

@Dorirrst

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

ruby

Expected/Current Behaviour

Hi,

I installed ruby and msys2 and want to run ridk install but face an error: Installation failed: invalid byte sequence in UTF-8
If I run ridk install 1 I have more infos : C:/Users/*****/scoop/apps/ruby/4.0.1-1/lib/ruby/site_ruby/4.0.0/ruby_installer/runtime/msys2_installation.rb:103:in 'String#strip': invalid byte sequence in UTF-8 (Encoding::CompatibilityError)

Which refers to :

 begin
       yield IO.popen(["scoop", "prefix", "msys2"], &:read).strip
      rescue SystemCallError
end

If I change it to, this below, it is realizing that
MSYS2 seems to be unavailable
Download https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20251213.exe

begin
  output = IO.popen(["scoop", "prefix", "msys2"], &:read)
  output = output.force_encoding('UTF-8').scrub if output
  yield output.strip if output
  rescue SystemCallError, Encoding::CompatibilityError
end

I had msys2 installed with scoop but I think the scoop prefix msys2 could not be read for anyreason.
I try to change a lot of language settings but it was not helping at all.
what I tried:

chcp 65001
Set-Culture en-US
$env:LANG = "en_US.UTF-8"
$env:LC_ALL = "en_US.UTF-8"

Maybe it can help you to troubleshoot this.
Thanks

Steps to Reproduce

scoop install ruby
scoop install msys2
msys2
# close and reopen
ridk install
ridk install 1

Possible Solution

Adapt msys2_installation.rb as described above.

Scoop and Buckets Version

Current Scoop version:
b588a06e (HEAD -> master, tag: v0.5.3, origin/master, origin/HEAD) chore(release): Bump to version 0.5.3 (resync) (#6436)

'main' bucket:
78785a2005 (HEAD -> master, origin/master, origin/HEAD) slang: Update to version 2026.4

'extras' bucket:
d07d35dee8 (HEAD -> master, origin/master, origin/HEAD) imagine@2.5.2: Fix hash (Closes #17369)

'versions' bucket:
c9d5c685dd (HEAD -> master, origin/master, origin/HEAD) yazi-nightly: Update to version 741f84e

'sysinternals' bucket:
ddd5c31 (HEAD -> main, origin/main, origin/HEAD) sysinternals-suite: Update to version 2026.03.05

'nerd-fonts' bucket:
a3a34c44 (HEAD -> master, origin/master, origin/HEAD) Dream-Han-Serif: Update to version 3.03

Scoop Config

last_update                       scoop_repo                              scoop_branch
-----------                       ----------                              ------------
2026-03-07T12:39:18.1380931+01:00 https://github.com/ScoopInstaller/Scoop master

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.26100.7705
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.7705
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamWaiting for upstream (the developers of the software) to fix the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions