简体   繁体   English

安装json(1.8.6)时出错,Bundler无法继续

[英]An error occurred while installing json (1.8.6), and Bundler cannot continue

I tried to run the bundle install command and I got the following errors.我尝试运行bundle install命令,但出现以下错误。 After reading some stackoverflow posts, I also ran bundle update .在阅读了一些 stackoverflow 帖子后,我还运行了bundle update

I am still getting the issue of json ~ 1.8.6 gem (I guess).我仍然遇到json ~ 1.8.6 gem 的问题(我猜)。

An error occurred while installing json (1.8.6), and Bundler cannot continue.安装json(1.8.6)时出错,Bundler无法继续。 Make sure that gem install json -v '1.8.6' succeeds before bundling.在捆绑之前确保gem install json -v '1.8.6'成功。 Here the issue is not getting installation done properly.这里的问题是没有正确完成安装。

我尝试单独安装gem。但问题仍然存在。

Older versions of json gem have some incompatibilities with newer ruby.较旧版本的 json gem 与较新的 ruby​​ 存在一些不兼容。 Try to update json gem bundle update json尝试更新 json gem bundle update json

This can be solved by doing the following这可以通过执行以下操作来解决

1. Installing the ruby development environment by running the following command(for Linux machines). 1.运行以下命令安装ruby开发环境(Linux机器)。

sudo apt-get install ruby
ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]' -dev

Read this post for more details .阅读这篇文章了解更多详情

2. Now install the json -v '1.8.6' gem by running the following command. 2.现在通过运行以下命令安装json -v '1.8.6' gem。

sudo gem install json -v '1.8.6'

This should solve the issue.这应该可以解决问题。 Now try running bundle update and bundle install and it should work fine.现在尝试运行bundle updatebundle install ,它应该可以正常工作。

Thanks @TomLord and @Haider Ali for your inputs.感谢@TomLord@Haider Ali的投入。

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

相关问题 安装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 安装 json (1.7.6) 时出错,Bundler 无法继续。 - An error occurred while installing json (1.7.6), and Bundler cannot continue. 安装 json (1.8.1) 时出错,Bundler 无法继续 - An error occurred while installing json (1.8.1) and Bundler cannot continue 安装bcrypt(3.1.11)时发生错误,Bundler无法继续。 - An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. 安装mysql2(0.3.21)时出错,Bundler无法继续 - An error occurred while installing mysql2 (0.3.21), and Bundler cannot continue 安装sqlite3(1.3.13)时发生错误,并且Bundler无法继续 - An error occurred while installing sqlite3 (1.3.13), and Bundler cannot continue 安装pg(1.1.4)时发生错误,并且Bundler无法继续 - An error occurred while installing pg (1.1.4), and Bundler cannot continue 安装bcrypt 3.1.7时发生错误,捆绑器无法继续 - An error occurred while installing bcrypt 3.1.7 and bundler cannot continue 安装 eventmachine (1.0.3) 时出错,Bundler 无法继续 - An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM