简体   繁体   English

安装rails json gem时出错 - bundler无法继续

[英]Error while installing rails json gem - bundler cannot continue

I'm having problems with the Rails installation on Windows. 我在Windows上安装Rails时出现问题。 It cannot install the json gem, with the error message below. 它无法安装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.

运行此命令 -

sudo apt-get install libgmp-dev

From reading the error screenshot, it seems as if your system is missing the necessary build tools required by some native C/C++ extensions. 通过阅读错误屏幕截图,您的系统似乎缺少某些本机C / C ++扩展所需的必要构建工具。

You can try installing the RubyInstaller Development Kit . 您可以尝试安装RubyInstaller 开发工具包 This toolkit helps with using native C/C++ extensions for Ruby on your Windows machine. 此工具包有助于在Windows机器上使用Ruby的本机C / C ++扩展。

Installation instructions can be found here . 安装说明可在此处找到。

After it's installed, run gem update --system , then try again. 安装完成后,运行gem update --system ,然后再试一次。

Hope this helps! 希望这可以帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails - 安装 pg (1.1.3) 时出现 Gem 错误,并且 Bundler 无法继续 - Rails - Gem Error while installing pg (1.1.3), and Bundler cannot continue 安装json(1.8.1)时发生错误,Bundler无法继续 - Rails - An error occurred while installing json (1.8.1), and Bundler cannot continue - Rails Rails中的“安装json(1.8.0)时发生错误,并且Bundler无法继续” - “An error occurred while installing json (1.8.0), and Bundler cannot continue” in Rails 使用gem安装mysql时出现错误“ Bundler无法继续…” - Error “Bundler cannot continue…” while installing mysql with gem 安装 json (1.7.6) 时出错,Bundler 无法继续。 - An error occurred while installing json (1.7.6), and Bundler cannot continue. 安装json(1.8.6)时出错,Bundler无法继续 - An error occurred while installing json (1.8.6), and Bundler cannot continue 安装 json (1.8.1) 时出错,Bundler 无法继续 - An error occurred while installing json (1.8.1) and Bundler cannot continue 安装gcloud(0.8.1)时发生错误,而Bundler无法继续 - gcloud gem导致部署失败 - An error occurred while installing gcloud (0.8.1), and Bundler cannot continue - gcloud gem causes deploy to fail 安装 sqlite3 (1.3.7) 时出错,Bundler 无法继续无法创建 rails 应用程序 - An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue Cannot create rails app Windows 10上的Rails错误(安装sqlite3(1.4.1)时发生错误,并且Bundler无法继续) - Rails error on windows 10 (An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM