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

[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 this issue Aug 26, 2021 · 2 comments

Comments

@rubyFeedback
Copy link

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):

  • If during installation the user does not install msys2, does this
    mean that the user can not compile gems that have to be compiled?

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):

  • This one is partially related. Is it possible to install the
    msys2 toolchain afterwards, without a reinstall? Perhaps "ridk"
    could offer this, e. g. by tapping into the ruby-one-click
    installer .exe. (Let's assume the user already installed the
    non-msys variant during the installation).

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

mohits commented Aug 31, 2021

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!

@oneclick oneclick deleted a comment from rubyorails Oct 3, 2021
@preetpalS
Copy link

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

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

3 participants