0

I wanted to play around with the latest Ruby on windows, so I installed the MSYS2 toolkit first. After this I ran the RubyInstaller for version 2.4.2 and it was able to find out that MSYS2 is already installed on my system.

I checked in the environment variables, if there is an entry for the same, to my surprise there was no such entry. I also tried to search in the windows registry, but didn't found any clue.

Can someone explain me how RubyInstaller is handling that?

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
Rajkaran Mishra
  • 4,532
  • 2
  • 36
  • 61
  • I believe it simply checks `C:\msys32` folder. – Aleksei Matiushkin Oct 26 '17 at 12:24
  • Actually, I was expecting the file name where this is written. – Rajkaran Mishra Oct 26 '17 at 12:42
  • 1
    This is actually a often asked question. RubyInstaller looks for MSYS2 at every ruby start in several different directories. It's best visible by looking into the [implementation here](https://github.com/oneclick/rubyinstaller2/blob/rubyinstaller-2.5.1-1/lib/ruby_installer/build/msys2_installation.rb#L32-L69). – Lars Kanis Apr 14 '18 at 15:43

1 Answers1

1

You can check in cmd or powershell for its path as:

>where msys2

or search within all environment variables as sometimes limited entries could be shown over system properties as:

> $ENV:PATH

If its not found,then for x86_64 package of MSYS2

Set environment PATH to C:\msys64\usr\bin

Jaswinder
  • 1,455
  • 14
  • 27