json - 捆绑安装 Json 错误
问题描述
我的 ruby 环境已经设置好了。我可以通过命令行检索我的 Gherkins 语法并运行简单的 ruby 网络测试。但我需要一些其他的宝石来完成环境。我需要做的就是让 bundle install 工作,但不知道为什么它没有安装。我也更新了我的宝石。我在 Windows 10 上使用 Ruby 2.2.3。下面是我尝试运行后的输出。
C:\GitHubFiles\MyAccountWeb-Tests>bundle install
Fetching gem metadata from http://rubygems.org/............
Resolving dependencies...
Using public_suffix 3.0.2
Using addressable 2.5.2
Using awesome_print 1.8.0
Installing json 2.1.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20180817-13500-1p562oy.rb extconf.rb creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
make failed, uncaught signal 11
Gem files will remain installed in
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0 for inspection.
Results logged to
C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-2.1.0/gem_make.out
An error occurred while installing json (2.1.0), and Bundler cannot
continue.
Make sure that `gem install json -v '2.1.0' --source 'http://rubygems.org/'`
succeeds before bundling.
In Gemfile:
appium_lib was resolved to 9.7.1, which depends on
json
我的来源已经设置为“ http://rubygems.org/ ”。我运行了“gem sources -r https://rubygems.org -a http://rubygems.org ”来确认这一点。尝试运行 'gem install json -v '2.1.0' 后的输出如下。
C:\GitHubFiles\MyAccountWeb-Tests>gem install json -v '2.1.0'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20180817-15312-13stnps.rb extconf.rb
creating Makefile
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
make failed, uncaught signal 11
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-2.1.0/gem_make.out
gem_make 文本文件
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20180817-10044-ypvx4a.rb extconf.rb
creating Makefile
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
make failed, uncaught signal 11
根据此链接,我应该尝试 rake install。https://www.rubydoc.info/gems/json/2.1.0。但它只是说 rake 中止了。未找到 rake 文件。
我还尝试了'gem install bundler -v'= 1.5.1'',然后是'bundle package',这会产生相同的 json 错误。
我已经尝试过捆绑更新和捆绑更新 json。
我读到json版本1.8.1和ruby 2.2.3有问题,所以安装json 1.8.3版本,所以我尝试了gem install json -v1.8.3。相同的json错误。
我尝试删除我的 gemfile 并再次运行 bundle update,它替换了 gemfile 并再次创建了 bundle install 错误:(
我被困住了!
解决方案
推荐阅读
- ios - 未计算文件的 React-Native Bundle Error 错误 SHA-1
- javascript - Jquery搜索过滤器并按对象键限制记录
- javascript - 在setState中反应分配动态ID?
- javascript - 有没有办法在用户输入字符时获取用户输入值,这意味着一旦他们点击提交
- php - 空购物车按钮无法删除购物车
- ruby-on-rails - Rails 返回创建的方式在控制器上有很多关联
- mysql - DBeaver 数据格式 - 巴西
- c++ - c ++中每次输出不同(意外行为)
- sed - 尝试将“user='mysql'”替换为“user=`whoami`”时,sed 无法按预期工作
- python - Python Navigation Timeout Exceeded:超过 8000 毫秒