我在Windows 7 Enterprise SP1上构建Ruby项目时遇到了麻烦。
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using awesome_print 1.7.0
Installing json 2.1.0 with native extensions
Using mini_portile2 2.1.0
Using ffi 1.9.18 (x64-mingw32)
Using rubyzip 1.2.1
Using websocket 1.2.4
Using tomlrb 1.2.4
Using bundler 1.14.6
Gem::InstallError: The 'json' 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'
An error occurred while installing json (2.1.0), and Bundler cannot continue.
Make sure that `gem install json -v '2.1.0'` succeeds before bundling.
我在我的PATH环境变量中包含了Ruby和DevKit,即C:\Ruby22-x64\bin;C:\Ruby-DevKit\bin
。可能出现什么问题?
我正在运行的命令bundle install
位于此项目的..\tindermation\node_modules\.bin
目录中:https://github.com/feelobot/tindermation
答案 0 :(得分:1)
我没有初始化并将DevKit中的ruby安装绑定到我的路径:
下载它,运行它以将其提取到某个地方(永久)。然后cd到它,运行ruby dk.rb init
和ruby dk.rb install
。执行这些步骤后bundle install
命令有效。