How to check version of Ruby dev kit installed in my Windows?

前端 未结 5 1682
小蘑菇
小蘑菇 2021-02-18 12:59

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 w

相关标签:
5条回答
  • 2021-02-18 13:21

    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]
    
    0 讨论(0)
  • 2021-02-18 13:31

    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.

    0 讨论(0)
  • 2021-02-18 13:38

    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]
    
    0 讨论(0)
  • 2021-02-18 13:39

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

    0 讨论(0)
  • 2021-02-18 13:44

    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

    0 讨论(0)
提交回复
热议问题