Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_build/
dist/
artifacts/
*.msi
*.wixpdb
*.cab
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ more than that zip layout.
rbmanager is a small version manager in the spirit of Python's install
manager (PEP 773): it fetches a binary-package zip, extracts it under
`%LOCALAPPDATA%\Ruby\rubies\`, and makes it available on PATH. No
elevation is required at any point. Both names mirror pymanager: the
elevation is required for rbmanager itself or for the per-user rubies;
see below for the one exception. Both names mirror pymanager: the
command is `rb` as pymanager's is `py`, and the data directory is named
after the language (`%LOCALAPPDATA%\Ruby`, like `%LocalAppData%\Python`)
rather than after the tool. rbmanager remains the product name.
Expand All @@ -41,6 +42,17 @@ it (signature-verified, elevated); `--yes` skips the consent prompt.
C extension gems with MSVC; see
[docs/devkit-enable.md](docs/devkit-enable.md).

The official mswin packages deliberately do not bundle
vcruntime140.dll (https://bugs.ruby-lang.org/issues/22180) and expect
the machine-wide Microsoft Visual C++ Redistributable instead. That
component installs per-machine, which is the one exception to the
no-elevation rule: when it is missing, `rb setup` offers to download
and install it through a single UAC prompt. Declining the consent
question or the UAC prompt leaves rbmanager and the installed rubies
intact; `rb setup` prints the installer URL so an administrator can
install it manually, and `rb install` / `rb use` merely warn that
ruby.exe cannot start until the runtime is present.

The active ruby is exposed through an NTFS directory junction
`%LOCALAPPDATA%\Ruby\current`, and `install` appends
`%LOCALAPPDATA%\Ruby\current\bin` to the user PATH once; switching
Expand Down
5 changes: 3 additions & 2 deletions src/rbmanager/VcRedist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ public static async Task<int> Ensure(bool assumeYes)
return 0;
}

Console.WriteLine("""
Console.WriteLine($"""
The Microsoft Visual C++ Redistributable (x64) is not installed.
Ruby's official Windows packages rely on it; without vcruntime140.dll
ruby.exe cannot start. Installing it affects the whole machine and
prompts for administrator approval (UAC).
prompts for administrator approval (UAC). Without administrator
rights, ask an administrator to install {InstallerUrl} instead.
""");
if (!assumeYes)
{
Expand Down
Loading