您可以在这里下载最新的 Ruby 发行版。目前最新的稳定版本是
4.0.6。另外，请先阅读 [Ruby 版权说明][license]。
{: .summary}

### 安装 Ruby 的方法

每个流行的平台都有多种工具可用于安装 Ruby：

* Linux/UNIX 平台，可以使用第三方工具（如 [rbenv][rbenv] 或 [RVM][rvm]）或使用系统中的包管理系统。
* macOS 平台，可以使用第三方工具（如 [rbenv][rbenv] 或 [RVM][rvm]）。
* Windows 平台，可以使用 [RubyInstaller][rubyinstaller]。中国大陆用户可以访问 [RubyInstaller.cn][rubyinstaller.cn]，其中下载链接全部来自国内镜像站，无需再担心网络问题。

使用包管理系统或第三方工具的详细说明，参见[安装页面][installation]。

当然，每个平台都可以从源代码编译安装 Ruby。

### 从源代码编译 Ruby

如果您非常熟悉您的操作系统，或是您的环境需要特別设定，那么直接使用源码安装是个极佳的方式。如果您的平台没有编译好的包，则需要通过源代码来安装。

从源代码编译 Ruby 的详细说明，参见[安装页面][installation]。若编译 Ruby 时遇到问题，请参考安装页面罗列的第三方工具，可能会有帮助。

* **稳定版:**
  * [Ruby 4.0.6](https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.6.tar.gz)<br>
    sha256: 837d299e8f7ddf2be31a229a7a7e019d354979825117989acb3b32b1a9be262a
  * [Ruby 3.4.10](https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.10.tar.gz)<br>
    sha256: ecee2d072a14f2d14347dd56dfd8fe5c3130abf5117bfaacbda0f4ef9cc429ec
  * [Ruby 3.3.12](https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.12.tar.gz)<br>
    sha256: b06d63beae271933033e27f0a389bc582a009e7845357d44365c39de525a051b
  * [Ruby 3.2.11](https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.11.tar.gz)<br>
    sha256: b3eeabd6636f334531db3ffdc3229eb05e524740e6c84fdc043720573cf2f8b2






* **不再维护的版本（EOL）:**
  * [Ruby 3.1.7](https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz)<br>
    sha256: 0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b


* **快照：**
  * [稳定版快照](https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_4_0.tar.gz)：当前稳定版 tarball 的最新快照
  * [每日构建版快照](https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.gz)：这是 Git 上的 tarball，每晚构建。可能有问题或 bug，谨慎使用！

更多有关特定发行版本、特别是老旧版本的资讯，请参阅[版本页面][releases]。
关于现正维护中的多个 Ruby 分支资讯，可在[分支页面][branches]中找到。

关于 Ruby Subversion 和 Git 仓库的信息，参见 [Ruby Core](/zh_cn/community/ruby-core/) 页面。

Ruby 源代码可从世界各地的[镜像站][mirrors]获得。请尝试离您最近的镜像站。



[license]: /en/about/license.txt
[installation]: /zh_cn/documentation/installation/
[releases]: /zh_cn/downloads/releases/
[branches]: /zh_cn/downloads/branches/
[mirrors]: /en/downloads/mirrors/
[rvm]: http://rvm.io/
[rbenv]: https://github.com/rbenv/rbenv
[rubyinstaller]: https://rubyinstaller.org/
[rubyinstaller.cn]: https://rubyinstaller.cn/
