【发布时间】:2015-07-17 10:58:37
【问题描述】:
我在 bundle install 上收到此错误,这没有意义,因为 devise 3.3 已经安装。
错误:
Bundler could not find compatible versions for gem "devise":
In Gemfile:
devise_token_auth (>= 0) ruby depends on
devise (~> 3.2) ruby
spree_auth_devise (>= 0) ruby depends on
devise (~> 2.2.3) ruby
devise (~> 3.3) ruby
宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', "~> 4.2.1"
# Use postgresql as the database for Active Record
gem 'pg'
# Use Bootstrap-SASS
gem 'bootstrap-sass', '~> 3.3.4'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Downgrade version - Workaround for Windows
gem 'coffee-script-source', '1.8.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'rails-api'
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'therubyracer', group: :production
gem 'devise', '~> 3.3'
gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_auth_devise', :github => 'spree/spree_auth_devise', :branch => '1-3-stable'
gem 'devise_token_auth'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-google'
gem 'rake', '10.4.2'
gem 'yelp'
gem 'rack'
gem 'textacular', '~> 3.0'
gem 'byebug'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'rails_12factor', group: :production
gem 'rack-cors', :require => 'rack/cors'
gem 'aws-sdk'
【问题讨论】:
-
您是否要安装
devise_token_authgem?发布Gemfile.lock的相关部分 -
我正在尝试安装
spree_auth_devise,devise_token_auth已经安装。我已经删除了Gemfile.lock。 -
使用
gem 'devise', '~> 3.4.1'更新gemfile 并尝试bundle -
为什么你在版本 3 中使用 spree 而在版本 1-3 中使用 spree_auth_devise ?来自:github.com/spree/spree_auth_devise#installation "请确保您使用的 spree_auth_devise 分支与您的 Spree 版本相关。"
标签: ruby-on-rails gemfile