无法激活faraday_middleware-0.9.0 // Gem :: LoadError //试图运行pocket-ruby gem

时间:2014-04-12 22:53:03

标签: ruby api ruby-on-rails-4 gem bundle

我正在尝试运行pocket-ruby gem并在克隆repo和bundle之后,它引发了这个错误:

Unable to activate faraday_middleware-0.9.0, because faraday-0.9.0 conflicts with faraday
(< 0.9, >= 0.7.4)

pocket-ruby gem的gemspecfile如下所示:

require File.expand_path('../lib/pocket/version', __FILE__)

Gem::Specification.new do |s|
 s.add_development_dependency('sinatra', '~> 1.3.3')
 s.add_development_dependency('multi_xml')

 s.add_runtime_dependency('faraday', ['>= 0.7', '< 0.9'])
 s.add_runtime_dependency('faraday_middleware', '~> 0.8')

 s.add_runtime_dependency('multi_json', '>= 1.0.3', '~> 1.0')
 s.add_runtime_dependency('hashie',  '>= 0.4.0')
 s.authors = ["Turadg Aleahmad","Jason Ng PT"]
 s.description = %q{A Ruby wrapper for the Pocket API v3 (Add, Modify and Retrieve)}
 s.email = ['turadg@aleahmad.net',"me@jasonngpt.com"]
 s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
 s.files = `git ls-files`.split("\n")
 s.homepage = 'https://github.com/turadg/pocket-ruby'
 s.name = 'pocket-ruby'
 s.platform = Gem::Platform::RUBY
 s.require_paths = ['lib']
 s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') 
 if s.respond_to?    :required_rubygems_version=
 s.rubyforge_project = s.name
 s.summary = %q{Ruby wrapper for the Pocket API v3}
 s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
 s.version = Pocket::VERSION
end

我搞砸了两个相关问题的版本,但没有运气,因为我想我不完全确定错误在说什么。想法?

1 个答案:

答案 0 :(得分:0)

两个版本说明符之间存在冲突 - ~> 0.8表示&#34;表格0.x&#34;的任何版本,但< 0.9表示0.9实际上并不允许。

您需要确定哪些需要更改 - 可能~> 0.8应该是~> 0.8.0,这将指定&#34;任何版本的0.8.x和#34格式;

有关悲观约束运算符(~>)的更多信息,请点击此处:

Meaning of tilde-greater-than (~>) in version requirement?