当我试着
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)我已经尝试了我的Gemfile的两个版本,一个是标准的Gemfile加上bitpay行,另一个是我注释掉了所有其他的Gemfile,只有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等。谢谢=)
做'gem list‘我可以看到我有两个必需的版本: railties (4.1.8,4.0.12,4.0.9,3.1.0)
发布于 2014-12-10 04:31:41
这个问题的存在是因为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时,它正在尝试使用Rubygems.org版本的spree_auth_devise,这个版本自2012年以来就没有更新过(似乎是在Rails 3的时候)。
您的问题的解决方案是添加到您的Gemfile以上行。
此外,您应该向spree-bitpay的维护者提出这个问题。请向他们开放一个问题,我相信他们会很感激的!
https://stackoverflow.com/questions/27377899
复制相似问题