2

我正在尝试通过 Ruby gem 安装防护。即使我尝试通过引用此链接安装以前的版本,我也收到以下错误。

C:\>gem install guard
Fetching: thor-0.18.1.gem (100%)
Successfully installed thor-0.18.1
Fetching: timers-1.1.0.gem (100%)
Successfully installed timers-1.1.0
Fetching: celluloid-0.15.2.gem (100%)
Successfully installed celluloid-0.15.2
Fetching: rb-fsevent-0.9.3.gem (100%)
Successfully installed rb-fsevent-0.9.3
Fetching: ffi-1.9.3.gem (100%)
ERROR:  Error installing guard:
        The 'ffi' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'


C:\>gem install ffi --version='1.0.9'
Fetching: ffi-1.0.9.gem (100%)
ERROR:  Error installing ffi:
        The 'ffi' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
4

1 回答 1

3

获取安装程序

1.Ruby安装程序

2.开发套件

根据您的 32 或 64 位机器下载相应的,您可以从这里下载开发工具包 从这里下载开发工具包

将 DevKit 解压到 C:\RubyDevKit 后,在 cmd 提示符下运行以下命令: C:\RubyDevKit>devkitvars.bat 将 DevKit 添加到 PATH...

C:\RubyDevKit>ruby dk.rb init [INFO] found RubyInstaller v1.9.3 at C:/Ruby193

初始化完成!请查看并修改自动生成的 'config.yml' 文件,以确保它包含您希望通过 DevKit 增强的所有已安装红宝石的根目录。

C:\RubyDevKit>ruby dk.rb install

[INFO] 更新 'C:/Ruby193' 的便捷通知 gem 覆盖 [INFO] 安装 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'

然后通过输入命令提示符安装指南针

"gem install compass"

完成!!!

于 2015-11-19T08:21:33.677 回答