oneclick / rubyinstaller2

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

[Documentation / Clarification] What happens if msys2 is not installed, can it be installed via "ridk" lateron, and what about multiple ruby versions including different vendors (jruby, GraalVM etc...) #244

Open rubyFeedback opened 2 years ago

rubyFeedback commented 2 years ago

Hey Lars,

The current README has this:

"It therefore integrates well into MSYS2 after installation on the target system to provide a build-and-runtime environment for installation of gems with C-extensions."

I have two questions or suggestions to make; perhaps you may consider them useful to adapt the README, or not, that is your decision of course.

Question/Item Number (1):

I assume that this is the case, but it would be helpful if the README can clarify this part. I had a quick count: most of the gems I use do not need a compiler, but a few do such as nokogiri (if I remember correctly).

Question/Item Number (2):

Allow me to briefly explain the point of view I am coming from with these two questions/suggestions, because you may be confused otherwise, if these are too-simple-to-answer perhaps. :)

I installed the older ruby one click installer, I think ruby 2.7.2 or something like that. Then I also installed jruby; this one uses ruby 2.5.8 or something like that right now.

I also installed ruby 3.0.1, and more recently 3.0.2.

I also opted for the msys2 dev kit during installation.

Then I went on to install msys2 again, into another directory under C:. Last but not least I also installed GraalVM.

Somehow I had like 5 different ruby versions or so.

Because I had no idea what was going on anymore, and the wrong ruby version was picked up, I removed EVERYTHING related to the above, then installed the ruby one click installer for 3.0.2. This one works fine. I use it on linux too.

Right now my laptop (with Win10) is batch-installing lots of things, but sooner or later I want to set up a msys2 development environment again. I use ruby to batch-compile on linux, and I can adjust my scripts to windows eventually - but ideally I want to setup msys2 only ONCE. Right now I don't know whether ruby could compile gem extensions if I set msys2 in some other path, but I will find out.

This is why any information in this regard would be useful in the long run, because I think other users may also have msys2 installed already or may opt to use the ruby variant instead. Right now I do not know if there are any differences, so any information in this regard would be useful.

The ruby one click installer itself works perfectly well, which is the main part, so the rest of this suggestion is mostly cosmetic stuff. :)

(Obviously when I use GraalVM and/or jruby then this may be more complicated, but since I ran into issues in the past, I am going to stick solely to the one-click-installer for some time now. It's just so much simpler to handle just one version of ruby installed...)

As always feel free to close this issue at any moment in time.

mohits commented 2 years ago

Hi @rubyFeedback - I think I replied to you in another thread, but for switching between Rubies on Windows, please do consider the use of Pik - I have a small post that could help you: https://notepad.onghu.com/2021/ruby3-windows-pik-multiple-installations/ I regularly use that to switch between Ruby 2.6, Ruby 3, Ruby 1.9.3 and JRuby.

On the other items, I need to do a check also because I have not done that :)

Cheers!

preetpalS commented 2 years ago

@rubyFeedback I would recommend a tool called uru for managing Ruby versions on Windows. It's useful if you have multiple projects but want to migrate them between Ruby versions (it's not really practical to migrate everything at once).