Explore the world of Mac. Check out MacBook Pro, MacBook Air, iMac, Mac mini, and more. Visit the Apple site to learn, buy, and get support. Lipstick: the iconic product that made MAC famous. Shade, define, and accentuate the lips with hundreds of hues in high-fashion textures.
Here you can get the latest Ruby distributions in your favorite flavor.The current stable version is 3.0.1.Please be sure to read Ruby’s License.
We have several tools on each major platform to install Ruby:
See the Installation page for details on usingpackage management systems or third-party tools.
Of course, you can also install Ruby from source on all major platforms.
Installing from the source code is a great solution for when you arecomfortable enough with your platform and perhaps need specific settingsfor your environment. It’s also a good solution in the event that thereare no other premade packages for your platform.
See the Installation page for details on buildingRuby from source. If you have an issue compiling Ruby, consider usingone of the third party tools mentioned above. They may help you.
ruby_3_0
branch.ruby_2_7
branch.ruby_2_6
branch.For more information about specific releases, particularly older releasesor previews, see the Releases page.Information about the current maintenance status of the variousRuby branches can be found on the Branches page.
For information about the Ruby Subversion and Git repositories, see ourRuby Core page.
The Ruby source is available from a worldwide set ofMirror Sites.Please try to use a mirror that is near you.
macOS Sierra 上的ruby版本为 ruby 2.0.0p648, 但是在安装cocoapods的时候,提示 activesupport requires Ruby version >= 2.2.2。
有两种办法安装新版本的ruby:
一: 使用Homebrew来安装,如果没有安装Homebrew的话,首先安装
$sudo ruby-e'$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' |
安装完成之后在终端执行如下命令来安装ruby
2 | $brew install ruby |
安装完成之后,需要添加ruby到环境变量即可。
二:使用rvm(Ruby Version Manager,Ruby版本管理器)进行安装,推荐使用这种方法。首先安装rvm: