Bundler找不到gem的兼容版本" devise"?

时间:2015-07-17 10:58:38

标签: ruby-on-rails gemfile

我在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

的Gemfile:

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'

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,但版本较新,但是输出结果表明它存在依赖性问题

Bundler could not find compatible versions for gem "devise":
  In Gemfile:
    devise_token_auth (~> 0.1.37) ruby depends on
      devise (< 4.1, > 3.5.2) ruby

    devise (4.1.0)

我从 Gemfile 中取出 devise 版本,以便捕获devise_token_auth正在使用的 devise 版本:

Using devise 4.0.2
...
Using devise_token_auth 0.1.37

因此,您可以使用您已获得的版本返回 Gemfile

gem 'devise', '~> 4.0.2'
...
gem 'devise_token_auth', '~> 0.1.37'