Bundler could not find compatible versions for gem "devise"? - ruby-on-rails

I am getting this error on bundle install, which does not make sense because devise 3.3 is installed already.
Error:
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'

I have the same problem but with newer versions, but as the output says it's problem of dependencies
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)
I take out the version for devise from the Gemfile in order to catch the version of devise that devise_token_auth is using:
Using devise 4.0.2
...
Using devise_token_auth 0.1.37
So you can go back to Gemfile with the versions that you've obtained:
gem 'devise', '~> 4.0.2'
...
gem 'devise_token_auth', '~> 0.1.37'

Related

When trying to upgrade to Rails 5, getting "Bundler could not find compatible versions for gem "railties"" error

I’m trying to upgrade to Rails 5. I deleted my Gemfile.lock file, edited my Gemfile to look like below
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.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
# 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
# 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
gem 'addressable'
gem 'postgresql'
gem 'pundit'
gem 'omniauth-oauth2', '~> 1.3.1'
gem 'omniauth-google-oauth2'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-linkedin-oauth2'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jquery-modal-rails'
gem 'will_paginate'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
gem 'whenever', :require => false
gem 'compass-rails'
group :development do
gem 'rails_layout'
end
and ran “bundle install”, only to get the below errors
$ bundle install
Your Gemfile lists the gem jquery-rails (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies..............
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (~> 4.1.0) was resolved to 4.1.1, which depends on
railties (< 5.1.x, >= 4.0.0)
jquery-modal-rails was resolved to 0.0.1, which depends on
railties (< 5.0, >= 3.2.0)
jquery-rails was resolved to 4.1.1, which depends on
railties (>= 4.2.0)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
railties (< 6, >= 4.0.0)
web-console (~> 2.0) was resolved to 2.3.0, which depends on
railties (>= 4.0)
How do I properly edit my Gemfile so I can upgrade to Rails 5?
Try to remove one of the repeated jquery-rails gem and run bundle install again.
// remove this line
gem 'jquery-rails'
Also change your gem 'coffee-rails' line for this:
gem 'coffee-rails', '~> 4.2'
I have a Rails 5 project running without problems with following Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.3.18', '< 0.5'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use Capistrano for deployment
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Try to reinstall the railties gem :
gem install railties

error while installing spree-commerece gem

I am trying to install `gem 'spree', '3.0.5' in my rails app.
Here's what I have in my Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', github: 'rails/sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# 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
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'spree', '3.0.5'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
Here's what I am getting when I hit bundle install
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
sass-rails was resolved to 6.0.0, which depends on
sprockets (>= 4.0)
Could not find gem 'sprockets (>= 4.0)', which is required by gem
'sass-rails', in any of the sources.
I'd recommend using Solidus, it's a fork of Spree, Spree isn't actively maintained anymore, Solidus is.
https://solidus.io/
Github: https://github.com/solidusio/solidus
If you run into any more problems, please reply and I'll help you through it.
EDIT:
Seems spree is continuing development with a new development team for 2016.
To answer your question, try the stable 3.x version
gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
https://github.com/spree/spree/issues/6964

Bundler could not find compatible versions for gem “spree_core"

I’m trying to install spree_braintree gem to integrate braintree gateway with spree 3.0.1. When I run “bundle install”, I get this error “Bundler could not find compatible versions for gem “spree_core”". This is my Gemfile.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.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
# 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
# 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
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'spree', '3.0.1'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
gem 'spree_braintree', :git => 'git://github.com/rortechie/spree-braintree.git
'
Error message:
<pre>
Bundler could not find compatible versions for gem "spree_core":
In Gemfile:
spree_braintree (>= 0) ruby depends on
spree_core (~> 1.0.0) ruby
spree (= 3.0.1) ruby depends on
spree_sample (= 3.0.1) ruby depends on
spree_core (3.0.1)
I also tried to remove Gemfile.lock and run bundle install but it didn't help.I am using ruby 2.2.2 and rails 4.2.1.

bundle install error activeadmin ransack

Am trying to install my own project onto a secondary computer - both are macosx 10.8.4, both setup using macports and RVM.
For some reason as I'm trying to bundle install I'm getting this error:
```
Bundler could not find compatible versions for gem "ransack":
In Gemfile:
activeadmin (>= 0) ruby depends on
ransack (>= 1.0.0) ruby
ransack (0.7.3)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
ransack (>= 0) ruby depends on
actionpack (>= 4.0.0) ruby
sass-rails (~> 4.0.0) ruby depends on
actionpack (4.0.0.beta1)
```
Not sure why bundle install works fine on one computer and not the other; I recently participated in this ransack issue on with activeadmin on github and it seemed to be fixed; unsure why it's popping up again.
UPDATE: gem file:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# 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'
gem 'ZenTest'
# Add Foundation Here
#gem 'compass-rails' # you need this or you get an err
# gem 'compass-rails', github: 'milgner/compass-rails', branch: 'rails4'
# gem 'zurb-foundation', '~> 4.0.0'
gem 'paperclip', '>= 3.4.0' # image upload
gem 'aws-sdk'
# gem 'bootstrap-sass', '~> 2.3.2.1'
gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
:github => 'anjlab/bootstrap-rails',
:branch => '3.0.0'
gem 'devise', github: 'plataformatec/devise'
gem 'devise_security_extension', :github => 'phatworx/devise_security_extension' # security questions
# administration
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
gem 'ransack', github: 'ernie/ransack', branch: 'rails-4'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'formtastic', github: 'justinfrench/formtastic'
gem "rich", github: 'bastiaanterhorst/rich'
# gem 'active_admin_editor'
gem 'survey', :git => 'git://github.com/runtimerevolution/survey.git'
# voting
# gem 'acts_as_votable', github: 'ryanto/acts_as_votable'
gem "acts_as_votable", "~> 0.7.1"
gem 'friendly_id', '5.0.0.beta4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+
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-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
gem 'rspec-rails'
gem 'spork'
gem 'spork-rails', :github => 'sporkrb/spork-rails'
gem 'annotate'
end
group :test do
gem 'rspec'
gem 'autotest'
gem 'autotest-growl'
gem 'autotest-fsevent'
end
I think you don't want to use the rails-4 branch of ransack. It looks like the current master version supports Rails 4.
The dependency on the rails4 branch of activeadmin says that it needs ransack >= 1.0.0, but the version of ransack on the rails-4 branch is 0.7.3.
It is probably a better idea to use the released versions of gems from Rubygems unless you need specific unreleased fixes in the Git repo.

Spree commerce installing

casionwoo#casionwoo-desktop:~/mystore$ bundle install
Updating https://github.com/spree/spree_gateway.git
Updating https://github.com/spree/spree_auth_devise.git
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
In Gemfile:
spree (= 2.0.3) ruby depends on
rails (~> 3.2.8) ruby
rails (4.0.0)
i am installing spree for setting i don't know why this error occured
Change gem 'rails', '4.0.0' on your Gemfile to gem 'rails', '~> 3.2.8'. There is no stable version of Spree compatible with Rails 4 yet.
PS: You might need to run bundle update rails afterwards.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '3.2.8'
# 3.2.4.rc1
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# 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-ruby', '~> 3.0.0'
# 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', '2.0.3'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-0-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-0-stable'
this is my Gemfile source code.
Spree version
gem 'spree', '~> 3.0.8'
gem 'spree_gateway', '~> 3.0.0'
gem 'spree_auth_devise', '~> 3.0.0'
is compatible with
gem 'rails', '4.2.6'

Resources