Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction of a ruby version manager for windows #378

Open
magynhard opened this issue Apr 8, 2024 · 5 comments
Open

Introduction of a ruby version manager for windows #378

magynhard opened this issue Apr 8, 2024 · 5 comments

Comments

@magynhard
Copy link
Contributor

magynhard commented Apr 8, 2024

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
@larskanis
Copy link
Member

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
Copy link
Collaborator

mohits commented Apr 8, 2024

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
Copy link

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

@magynhard
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants