提问人:Sandro Palmieri 提问时间:6/10/2015 最后编辑:200_successSandro Palmieri 更新时间:10/23/2015 访问量:7279
安装 rails json gem 时出错 - bundler 无法继续
Error while installing rails json gem - bundler cannot continue
问:
我在 Windows 上安装 Rails 时遇到问题。它无法安装 json gem,并显示以下错误消息。
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...........
Using rake 10.4.2
Using i18n 0.7.0
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 (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
答:
5赞
Zoran
6/10/2015
#1
从阅读错误屏幕截图来看,您的系统似乎缺少某些本机 C/C++ 扩展所需的必要构建工具。
您可以尝试安装 RubyInstaller 开发工具包。此工具包有助于在 Windows 计算机上使用 Ruby 的本机 C/C++ 扩展。
安装说明可以在这里找到。
安装后,运行 ,然后重试。gem update --system
希望这有帮助!
9赞
Mashpy Rahman
10/23/2015
#2
运行此命令-
sudo apt-get install libgmp-dev
评论
8赞
Jon Burgess
12/17/2015
"...在 Windows 上安装 Rails"
评论