安装 Ruby
开发环境包
- 下载工具包
https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
- 打开后解压到
D:\Ruby23\devkit
你可以自己指定 - 进入解压的目录
D:\Ruby23-x64\devkit
打开命令行 - 执行
ruby .\dk.rb init
在当前目录会生成一个config.yml
1
2
3
4
5PS D:\Ruby23-x64\devkit> ruby .\dk.rb init
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit. - 打开
config.yml
- 根据提示添加一行
- D:\Ruby23
- 其中
D:\Ruby23
后面的是你的Ruby
安装目录 - 执行
ruby .\dk.rb install
1
2
3PS D:\Ruby23-x64\devkit> ruby .\dk.rb install
[INFO] Updating convenience notice gem override for 'D:/Ruby23'
[INFO] Installing 'D:/Ruby23/lib/ruby/site_ruby/devkit.rb'