[英]Bundler could not find compatible versions for gem “railties” when using BitPay and Spree Commerce
當我嘗試
bundle install
我得到錯誤:
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)
我試用了2個版本的Gemfile,其中一個版本包含標准Gemfile和bitpay行,另一個版本中我注釋了所有其他gem,而bitpay行卻都無效。
的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'
我是Ruby和Gemfiles等的新手。謝謝=)
在執行“寶石列表”時,我可以看到我同時具有兩個必需的版本:railties(4.1.8、4.0.12、4.0.9、3.1.0)
存在問題是因為spree-bitpay的gemspec僅指定了'spree_auth_devise',而他們在自己的Gemfile中指定的版本實際上是這樣的:
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable'
我懷疑當您bundle install
,它正在嘗試使用spree_auth_devise的Rubygems.org版本,該版本自2012年以來未進行過更新(似乎是在Rails 3左右)。
解決問題的方法是將上述行添加到Gemfile中。
此外,你應該提出這個問題與大禮包 - bitpay的維護者。 請向他們提出問題,我敢肯定他們會感激的!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.