Ruby Version Manager 4 Windows
npm install rvm-windows
!downloads


> Reimplementation of most important rvm.io features for MS Windows
As there is no rvm.io available for native windows, but only for POSIX by Cygwin, this is a reimplementation of basic rvm.io
features for native MS Windows on the classic command line. It is based on the packages shipped by rubyinstaller.org.
RVM 4 Windows allows you to comfortably install and manage several versions of Ruby on your Windows machine.
It automatically detects .ruby-version files or ruby version definitions in Gemfiles and runs your project on the classic windows command line on the specified ruby version automatically.
Beneath you can switch your ruby version instantly.
Ruby environment configurations are managed by RVM per user in C:\Users\%USERNAME%\.rvm but stored for all users in C:\ProgramData\rvm by default.
> The goal of this project is not to 100% reimplement all features of
> rvm.io, but the most important and common ones by preserving most of the
> same command line interface. Some special Windows related stuff is added as well.
* Features & Limitations
* MSYS2_PATH
* Commands
* Usage
* Installation
* Troubleshooting
* Does not run the selected ruby
* Using behind a proxy
* Contributing
rvm add command..ruby-version files with autoswitchrvm kit command with recipes for several ruby versions to install common used native gems.
#### MSYS2_PATH
When installing a new ruby version, rvm-windows by default automatically installs a separate MSYS2 environment delivered by the devkit version.
If you want to use a central MSYS2 installation instead, you can set the MSYS2_PATH environment variable to the path of your MSYS2 installation.
Then rvm-windows will instead download the ruby installer without devkit and you can use your central MSYS2 installation for the installed ruby.
[!WARNING]
> Be aware, that you have to ensure, that your central MSYS2 installation has all needed packages installed to build native gems for the ruby versions you want to use.
>
> And there is a risk, that older ruby versions may not work with a newer MSYS2 installation.
``ruby`
add
automount # Scan for ruby installations and add them to the RVM configuration (alias: scan)
config # Print current RVM config
config data # Print RVM data directory
config data
config default # Print default version
config default
config proxy # Get the configured proxy host.
config proxy
config proxy delete # Remove the proxy server host from the configuration.
config proxy enable # Enable using the proxy server host from the configuration.
config proxy disable # Disable using the proxy server host from the configuration.
current # Print current ruby environment version
default # Use default ruby version (alias: rvm use default)
delete
fix # Automatically fix paths and versions in RVM configuration
get # Upgrade RVM to its latest release version
help # Print this usage guide
info # Show the environment information for current ruby
init # Initialize RVM by adding it to the PATH environment variable
install
kick
kit # Experimental: Install a bunch of widely used x64 dependencies automatically to the current ruby environment, which are needed to build native gems like postgresql, mysql2, ...
list # List all installed ruby versions managed by RVM
list verbose # List all installed ruby versions managed by RVM with additional info
list known # List all installable ruby versions with latest patch version
list all # List all installable ruby versions
mount
reinstall
remove
scan # Scan for ruby installations and add them to the RVM configuration (alias: automount)
system # Use the system ruby (alias: rvm use system)
uninstall
upgrade
upgrade
upgrades # List installed environments and available upgrades.
use
use --default
version # Display RVM build version
#### List installed rubies
`bash`
rvm list
* ruby-3.2.2
ruby-2.4.10
=> ruby-2.7.8
# => - current
# =* - current && default
# * - default
#### List installable rubies
`bash`
rvm list known
- ruby-3.3.0
- ruby-3.2.2
- ruby-3.2.1
...
- ruby-3.0.1
- ruby-3.0.0
- ruby-2.7.8
...
#### Switch version
You do not need to prefix ruby-`bash`
rvm use 2.4.10
Using ruby-2.4.10 ...
You even do not need to specify the exact version, it will automatically use or install the highest one available!
`bash`
rvm use 2
Using ruby-2.7.8 ...
#### Additional, undocumented shortcuts
There a lots of other shortcuts available, e.g. you can use rvm lv instead of rvm list verbose.
`js`
rvm list -> rvm l
rvm list -> rvm ls
rvm list verbose -> rvm lv
rvm list known -> rvm lk
rvm list all -> rvm la
...
#### Install new version
You do not need to prefix ruby- or specify the exact version, it will automatically install the highest one available!
`bash`
rvm install 3.2 # installs latest 3.2.x
rvm install 3 # installs latest 3.x.x
rvm install 2.7 # installs latest 2.7.x
rvm install 2 # installs latest 2.x.x
Ensure that NodeJS >= 18.x is already installed.
Then on your command line execute the following command:
#### npm
`bash`
npm install -g rvm-windows
After installing the command rvm is available on the command line.
Otherwise try
``
rvm init`
or`
rvm fix
again.
rvm-windows has only basic proxy support with Basic Authentication. For basic authentication, you can use the following format:
`yaml`
http://example
http://super:pwn123@myprox.local:1234
#### NTLM & other authentication methods
If you need to authenticate with other methods such as NTLM, you will need a intermediate proxy like px or CNTLM.
As CNTLM is only running very stable on *nix, we recommend using px proxy.
To check if your intermediate proxy is running correctly, try a test request with curl:
`bash`
curl -x http://127.0.0.1:3128 -X GET https://www.google.de
Then you should get the HTML document as response:
``
...
sAttribute("data-ved")?f=a?F(a)||"":"":f=(f=a.closest("[data-ved]"))?F(f)||"":"";
f=f||"";if(a.hasAttribute("jsname"))a=a.getAttribute("jsname");else{var E;a=null==
(E=a.closest("[jsname]"))?void 0:E.getAttribute("jsname")}google.log("rcm","&ei="
+b+"&tgtved="+f+"&jsname="+(a||""))}}else H=a,G=[b]}window.document.addEventListe
ner("DOMContentLoaded",function(){document.body.addEventListener("click",I)});}).
call(this);
After installing and configuring and testing px proxy, set your RVM config like this:
`bash``
rvm config proxy http://127.0.0.1:3128
Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/rvm-windows. This project is
intended
to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
the Contributor Covenant code of conduct.