24

Ruby dev kit is installed in my Windows 7. How can I check whether it's 32 bit or 64 bit and version number

I'm not asking How to check ruby version which is ruby -v

Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852

5 Answers5

19

On the 32 bit vs 64 bit part:

ruby -e "puts 1.size"

The 32 bit version would yield 4, the 64 bit version 8. (This is the size of a FixNum in bytes.)

qqbenq
  • 10,220
  • 4
  • 40
  • 45
6

Apparently the answer is that there is no way to get the version of DevKit (according to this post on the Google groups for RubyInstaller). To paraphrase that posting, because it is not an installer it doesn't present version information. It would appear the only way to know for sure is to dig up the original zip file used to install it.

BeardedCoder
  • 323
  • 4
  • 15
2

Starting with Ruby 2.4.0 the MSYS2 toolchain is used as development kit. (Learn more at https://rubyinstaller.org/downloads/)

There's no command I'm aware of that would return if MSYS2 is installed / or how to check its version. What you can do:

To check if MSYS2 was a part of your installation:

  1. Check your installation file's name, for example rubyinstaller-devkit-2.5.1-1-x64. Like here, if the devkit is in the name, it means it might be installed.
  2. Go to your installed programs, and find for Ruby, for me it's Ruby 2.5.1-1-x64 with MSYS2.

To check if MSYS2 has been actually installed:

  1. If there is msys64 catalog in your Ruby installation folder, it means that's MSYS2 is there.

  2. In order to check which version is installed, open Command Prompt and run the following line C:\Ruby25-x64\msys64\mingw64\bin>gcc --version (within the proper directory on your computer of course).

    That's what I can see:

    gcc (Rev2, Built by MSYS2 project) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I used the following tip > check the platform of the installed mingw, 32bit or 64 bit

laitart
  • 21
  • 4
-4

Use ruby -v in command prompt. if it shows the version installed on the system. then it means Ruby is installed on your system.

ex :

C:\Users\abhilash>ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
Hemant Parmar
  • 3,924
  • 7
  • 25
  • 49
-6

I've never done any kind of ruby development in Windows, but that being said, you should be able to run the ruby command line binary with the --version flag:

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.1.0]
dliggat
  • 418
  • 1
  • 4
  • 7