oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
643 stars 248 forks source link

Introduction of a ruby version manager for windows #378

Open magynhard opened 2 months ago

magynhard commented 2 months ago

Situation

When working on linux, it is very handy to use rvm (rvm.io) to manage several ruby environments.

When working on windows, there was no native alternative on the classic command line.

Solution

I was very unhappy with that and decided to start reimplementing a solution like rvm for windows.

It is based on your great windows installers and in early beta status.

As soon as it is fully developed and meets your requirements, I would be delighted if you could officially recommend the tool on your website.

I look forward to working with you.

So I would be very pleased to receive feedback from you. The basic features are working right now and limited to ruby releases x64 with devkit.

https://github.com/magynhard/rvm-windows


EDIT: What I'm longing for

larskanis commented 2 months ago

There is a simple ruby version switcher builtin into RubyInstaller: https://github.com/oneclick/rubyinstaller2/wiki/The-ridk-tool#ridk-use It doesn't do installation of ruby versions but switching between them only. Switching between versions simply works without any additional installs or configuration.

There's also uru https://bitbucket.org/jonforums/uru and pik https://github.com/vertiginous/pik which some of my co-workers are using to switch between versions. Both don't do install. And I guess they are no longer maintained.

I did not try your rvm for Windows, but from reading the README it looks promising!

mohits commented 2 months ago

I also use pik for switching Ruby versions on Windows, though it does not support gemsets, etc. but works very well for day-to-day life of using Ruby and JRuby even if it's a bit basic.

More: https://notepad.onghu.com/2021/ruby3-windows-pik-multiple-installations/

I love any effort to make #RubyonWindows better, so I will try your solution later. Thanks for sharing.

johnnyshields commented 2 months ago

I've used uru for years and it's working fine.

magynhard commented 1 month ago

Thank you for your responds.

I forgot to mention, that i not only wanted to have a version switcher, but also the same rvm command line interface for windows. As I'm working on windows and linux as well, i do not want to use different tools for the same job with its different CLI.

I will edit my initial post and add that info:

I plan to be feature complete with the basic features and to release the 1.0 release until this summer.

magynhard commented 1 month ago

@larskanis @mohits @johnnyshields

It's done! I've just made rvm-windows feature complete and released version 0.9.9.

Would be nice to get some feedback! https://github.com/magynhard/rvm-windows

One special feature idea for the future is the command rvm kit which includes recipes for several rubies to get most used native gems to work out of the box. It is experimental at the moment. For example in ruby 2.4 and 2.5 it will install msys from 2.6 automatically, as the latter is still working, but the others don't anymore.

I'm open to integrate more recipies or compatibility scripts, that make older ruby versions work again. There could also be scripts, downloading sources for explicit compilation, etc... that would be my special gift to rubyinstaller. So we could patch older windows rubies this way and recommend just using rvm-windows. No more googling and repairing manually.