如何检查我的Windows中安装的Ruby dev kit的版本?

时间:2022-06-01 18:26:30

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

Ruby开发工具包安装在我的Windows 7中。如何检查它是32位还是64位和版本号

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

我不是问如何检查ruby版本是ruby -v

5 个解决方案

#1


11  

On the 32 bit vs 64 bit part:

在32位与64位部分:

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

32位版本将产生4,即64位版本8.(这是FixNum的大小,以字节为单位。)

#2


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.

显然答案是没有办法获得DevKit的版本(根据RubyInstaller的Google小组上的这篇文章)。要解释该发布,因为它不是安装程序,它不提供版本信息。看来唯一可以确定的方法是挖掘用于安装它的原始zip文件。

#3


0  

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

从Ruby 2.4.0开始,MSYS2工具链用作开发工具包。 (了解更多信息,请访问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:

如果安装了MSYS2 /或如何检查其版本,那么我知道没有命令会返回。你可以做什么:

To check if MSYS2 was a part of your installation:

要检查MSYS2是否是您安装的一部分:

  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. 检查安装文件的名称,例如rubyinstaller-devkit-2.5.1-1-x64。就像这里一样,如果devkit在名称中,则意味着它可能已安装。
  3. Go to your installed programs, and find for Ruby, for me it's Ruby 2.5.1-1-x64 with MSYS2.
  4. 转到你安装的程序,找到Ruby,对我来说它是带有MSYS2的Ruby 2.5.1-1-x64。

To check if MSYS2 has been actually installed:

要检查MSYS2是否已实际安装:

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

    如果Ruby安装文件夹中有msys64目录,则表示MSYS2存在。

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

    要检查安装的版本,请打开命令提示符并运行以下行C:\ Ruby25-x64 \ msys64 \ mingw64 \ bin> gcc --version(当然,在您计算机的正确目录中)。

    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.

    gcc(Rev2,由MSYS2项目建立)7.3.0版权所有(C)2017 Free Software Foundation,Inc。这是免费软件;查看复制条件的来源。没有保修;甚至不适用于适销性或特定用途的适用性。

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

我使用了以下提示>检查已安装的mingw的平台,32位或64位

#4


-1  

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

在命令提示符下使用ruby -v。如果它显示系统上安装的版本。那么这意味着你的系统上安装了Ruby。

ex :

例如:

C:\Users\abhilash>ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]

#5


-3  

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:

我从未在Windows中进行任何类型的ruby开发,但话虽如此,您应该能够使用--version标志运行ruby命令行二进制文件:

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.1.0]

#1


11  

On the 32 bit vs 64 bit part:

在32位与64位部分:

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

32位版本将产生4,即64位版本8.(这是FixNum的大小,以字节为单位。)

#2


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.

显然答案是没有办法获得DevKit的版本(根据RubyInstaller的Google小组上的这篇文章)。要解释该发布,因为它不是安装程序,它不提供版本信息。看来唯一可以确定的方法是挖掘用于安装它的原始zip文件。

#3


0  

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

从Ruby 2.4.0开始,MSYS2工具链用作开发工具包。 (了解更多信息,请访问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:

如果安装了MSYS2 /或如何检查其版本,那么我知道没有命令会返回。你可以做什么:

To check if MSYS2 was a part of your installation:

要检查MSYS2是否是您安装的一部分:

  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. 检查安装文件的名称,例如rubyinstaller-devkit-2.5.1-1-x64。就像这里一样,如果devkit在名称中,则意味着它可能已安装。
  3. Go to your installed programs, and find for Ruby, for me it's Ruby 2.5.1-1-x64 with MSYS2.
  4. 转到你安装的程序,找到Ruby,对我来说它是带有MSYS2的Ruby 2.5.1-1-x64。

To check if MSYS2 has been actually installed:

要检查MSYS2是否已实际安装:

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

    如果Ruby安装文件夹中有msys64目录,则表示MSYS2存在。

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

    要检查安装的版本,请打开命令提示符并运行以下行C:\ Ruby25-x64 \ msys64 \ mingw64 \ bin> gcc --version(当然,在您计算机的正确目录中)。

    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.

    gcc(Rev2,由MSYS2项目建立)7.3.0版权所有(C)2017 Free Software Foundation,Inc。这是免费软件;查看复制条件的来源。没有保修;甚至不适用于适销性或特定用途的适用性。

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

我使用了以下提示>检查已安装的mingw的平台,32位或64位

#4


-1  

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

在命令提示符下使用ruby -v。如果它显示系统上安装的版本。那么这意味着你的系统上安装了Ruby。

ex :

例如:

C:\Users\abhilash>ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]

#5


-3  

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:

我从未在Windows中进行任何类型的ruby开发,但话虽如此,您应该能够使用--version标志运行ruby命令行二进制文件:

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.1.0]