ruby version: '2.5.7'
rails versionL '5.2.0'
gem 'mockserver-client', git: 'https://github.com/quintype/mockserver-client-ruby.git', branch: 'rails-5'在做包时,我得到了以下错误
mockserver-client-1.0.10.pre需要rubygems版本~> 2.3,该版本与当前版本3.1.2不兼容
我在Gemfile.lock中的绑定版本是bundler (>= 1.3.0)。
我使用的是Bundler version 1.17.3的邦德勒版本。
如何解决这个错误?
更新
我已经做过了
gem install "rubygems-update:3.1.2"
Successfully installed rubygems-update-3.1.2
Parsing documentation for rubygems-update-3.1.2
Done installing documentation for rubygems-update after 0 seconds
1 gem installed
➜ subtype git:(2046) ✗ update_rubygems
Successfully built RubyGem
Name: bundler
Version: 2.1.2
File: bundler-2.1.2.gem
Bundler 2.1.2 installed
RubyGems 3.1.2 installed
Regenerating binstubs
Parsing documentation for rubygems-3.1.2
Installing ri documentation for rubygems-3.1.2
------------------------------------------------------------------------------
RubyGems installed the following executables:
/Users/vishal.sadriya/.rvm/rubies/ruby-2.5.7/bin/gem
/Users/vishal.sadriya/.rvm/rubies/ruby-2.5.7/bin/bundle
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for Ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.更新
进一步调查我发现这是gem hashie的问题
rails s
Could not find hashie-3.6.0 in any of the sources
Run `bundle install` to install missing gems.
---
gem install hashie-3.6.0
ERROR: Could not find a valid gem 'hashie-3.6.0' (>= 0) in any repository发布于 2020-03-02 12:36:37
在谷歌搜索3个小时后,我想我们的问题与gem 'mockserver-client'的gem依赖性有关。bundle check命令检查它是否满足了所有的gem依赖关系。
bundle check
The following gems are missing
* hashie (3.6.0)
* logging_factory (0.0.1)因此,我通过在我的系统中安装这个版本完全相同的依赖于创业板解决了宝石依赖问题。
gem install hashie -v 3.6.0
gem install logging_factory -v 0.0.1而且,我可以做bundle install,没有任何错误。bundle check是救了我一命的命令。:)
https://stackoverflow.com/questions/60487548
复制相似问题