我遇到了有线问题。在Gemfile.lock
中,它指出json (1.8.6)
。
基本上,我可以使用bundle install
来安装json-1.8.6
。
但是,当我运行rspec
命令时,它仍然会抛出以下错误。
Could not find json-1.8.6 in any of the sources
Run `bundle install` to install missing gems.
Bundler版本1.15.0
ruby 2.3.3
答案 0 :(得分:1)
检查gemfile中的ruby源应该是:source 'https://rubygems.org'
或尝试添加gem的github路径:
gem 'json', :git => 'https://github.com/flori/json.git'
还可以尝试bundle update
。
如果这些都不起作用,请发布您的gemfile。
答案 1 :(得分:-1)
我最近遇到过类似的问题,无法安装其中一个宝石。我不知道为什么,但我认为这是因为新的Windows更新(只是一个盲目的镜头)
我已经设法通过重新安装 Ruby和devkit来修复它。
祝你好运!