我的红宝石环境几乎已设置好。我可以通过命令行检索我的Gherkins语法并运行简单的ruby Web测试。但是我还需要其他一些宝石来完善环境。我需要做的就是使捆绑软件安装正常,但无法弄清楚为什么没有安装。我也更新了我的宝石。我在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/”。我运行了'宝石来源-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文件。
我还尝试了'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更新,这替换了gemfile并再次创建了bundle安装错误:(
我被卡住了!