[英]Bundler could not find compatible versions for gem “railties” when using BitPay and Spree Commerce
When I try to 当我尝试
bundle install
I get the error: 我得到错误:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
spree_bitpay (>= 0) ruby depends on
spree_auth_devise (>= 0) ruby depends on
devise (~> 2.0.4) ruby depends on
railties (~> 3.1) ruby
spree_bitpay (>= 0) ruby depends on
rails (= 4.0.9) ruby depends on
railties (4.0.9)
I have tried 2 versions of my Gemfile, one where I have the standard Gemfile plus the bitpay line, and one where I have all other gems commented out, and just the bitpay line, neither work. 我试用了2个版本的Gemfile,其中一个版本包含标准Gemfile和bitpay行,另一个版本中我注释了所有其他gem,而bitpay行却都无效。
Gemfile: 的Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.9'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'spree_bitpay', :git => 'https://github.com/bitpay/spree-bitpay.git'
I'm new to Ruby, and Gemfiles etc. Thanks =) 我是Ruby和Gemfiles等的新手。谢谢=)
Doing 'gem list' I can see that I have both required versions: railties (4.1.8, 4.0.12, 4.0.9, 3.1.0) 在执行“宝石列表”时,我可以看到我同时具有两个必需的版本:railties(4.1.8、4.0.12、4.0.9、3.1.0)
The problem exists because spree-bitpay's gemspec only specifies 'spree_auth_devise', while the version that they're specifying in their Gemfile is actually as such: 存在问题是因为spree-bitpay的gemspec仅指定了'spree_auth_devise',而他们在自己的Gemfile中指定的版本实际上是这样的:
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable'
I suspect that when you bundle install
, it's attempting to use the Rubygems.org version of spree_auth_devise, which has not been updated since 2012 (seems to be around the time of Rails 3). 我怀疑当您
bundle install
,它正在尝试使用spree_auth_devise的Rubygems.org版本,该版本自2012年以来未进行过更新(似乎是在Rails 3左右)。
The solution to your problem is to add to your Gemfile the above line. 解决问题的方法是将上述行添加到Gemfile中。
Furthermore, you should bring up this issue with the maintainers of spree-bitpay. 此外,你应该提出这个问题与大礼包 - bitpay的维护者。 Please open an issue with them, I'm sure they'll appreciate it!
请向他们提出问题,我敢肯定他们会感激的!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.