rubyinstaller2 icon indicating copy to clipboard operation
rubyinstaller2 copied to clipboard

Introduction of a ruby version manager for windows

Open magynhard opened this issue 1 year ago • 7 comments

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

  • provides the basic features and behaviour like RVM.io does for Linux/Mac/*nix
    • as I'm using rvm.io on linux, it would be nice to have the same CLI on windows
  • runs on windows on the classic command line
  • automatically switches ruby versions in directories with .ruby-version or Gemfile files

magynhard avatar Apr 08 '24 09:04 magynhard

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!

larskanis avatar Apr 08 '24 10:04 larskanis

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.

mohits avatar Apr 08 '24 23:04 mohits

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

johnnyshields avatar May 02 '24 15:05 johnnyshields

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:

  • provides the basic features like RVM.io does for Linux/Mac/*nix
  • runs on windows on the classic command line
  • automatically switches ruby versions in directories with .ruby-version or Gemfile files
  • as I'm using rvm.io on linux, it would be nice to have the same CLI on windows

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

magynhard avatar May 12 '24 17:05 magynhard

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

magynhard avatar May 17 '24 18:05 magynhard

@magynhard just saw this, GREAT!! I will check it out soon.

johnnyshields avatar Aug 06 '24 05:08 johnnyshields