Related
I am trying to update a rails app from 4.2 to 5 but see the following error when performing bundle update
In Gemfile:
actionpack
activerecord-session_store (= 1.1.0) was resolved to 1.1.0, which depends on
actionpack (< 5.2, >= 4.0)
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
actionpack (= 5.0.7.2)
rspec-rails (~> 4.0.0) was resolved to 4.0.2, which depends on
actionpack (>= 4.2)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
activeresource (~> 5.0) was resolved to 5.1.1, which depends on
activemodel (< 7, >= 5.0)
carrierwave (= 1.3.1) was resolved to 1.3.1, which depends on
activemodel (>= 4.0.0)
paperclip (~> 3.0) was resolved to 3.5.4, which depends on
activemodel (>= 3.0.0)
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
activemodel (= 5.0.7.2)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord-session_store (= 1.1.0) was resolved to 1.1.0, which depends on
activerecord (< 5.2, >= 4.0)
acts_as_list (= 0.9.19) was resolved to 0.9.19, which depends on
activerecord (>= 3.0)
oink was resolved to 0.10.1, which depends on
activerecord
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
activerecord (= 5.0.7.2)
thinking-sphinx (= 3.4.2) was resolved to 3.4.2, which depends on
activerecord (>= 3.1.0)
Bundler could not find compatible versions for gem "countries":
In Gemfile:
countries
country_select (~> 3.1, >= 3.1.1) was resolved to 3.1.1, which depends on
countries (~> 2.0)
Bundler could not find compatible versions for gem "geokit":
In Gemfile:
geokit (= 1.6.7)
geokit-rails (= 1.1.4) was resolved to 1.1.4, which depends on
geokit (>= 1.5.0)
Bundler could not find compatible versions for gem "i18n":
In Gemfile:
i18n (~> 0.6)
activemerchant was resolved to 1.43.3, which depends on
i18n (~> 0.5)
money (~> 6.13.8) was resolved to 6.13.8, which depends on
i18n (<= 2, >= 0.6.4)
Bundler could not find compatible versions for gem "json":
In Gemfile:
activemerchant was resolved to 1.43.3, which depends on
json (~> 1.7)
etsy (~> 0.2.5) was resolved to 0.2.7, which depends on
json (>= 1.5.0)
jslint (~> 1.2.0) was resolved to 1.2.0, which depends on
json
rdoc (~> 3.4) was resolved to 3.12.2, which depends on
json (~> 1.4)
simplecov was resolved to 0.17.1, which depends on
json (< 3, >= 1.8)
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
carrierwave (= 1.3.1) was resolved to 1.3.1, which depends on
mime-types (>= 1.16)
paperclip (~> 3.0) was resolved to 3.5.4, which depends on
mime-types
rest-client (~> 1.6.7) was resolved to 1.6.14, which depends on
mime-types (~> 1.16)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri
activemerchant was resolved to 1.43.3, which depends on
nokogiri (~> 1.4)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
activerecord-session_store (= 1.1.0) was resolved to 1.1.0, which depends on
railties (< 5.2, >= 4.0)
coffee-rails (~> 4.2.2) was resolved to 4.2.2, which depends on
railties (>= 4.0.0)
jquery-rails (~> 3.1.2) was resolved to 3.1.5, which depends on
railties (< 5.0, >= 3.0)
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
railties (= 5.0.7.2)
rspec-rails (~> 4.0.0) was resolved to 4.0.2, which depends on
railties (>= 4.2)
sass-rails (~> 5.0.5) was resolved to 5.0.7, which depends on
railties (< 6, >= 4.0.0)
Bundler could not find compatible versions for gem "redis":
In Gemfile:
redis (~> 3.3)
resque-scheduler (~> 4.3.0) was resolved to 4.3.1, which depends on
redis (< 5, >= 3.3)
Bundler could not find compatible versions for gem "rest-client":
In Gemfile:
rest-client (~> 1.6.7)
chargebee (= 2.2.8) was resolved to 2.2.8, which depends on
rest-client (~> 1.4)
easypost (~> 2.7, >= 2.7.1) was resolved to 2.7.3, which depends on
rest-client (>= 1.4)
Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby
activerecord-session_store (= 1.1.0) was resolved to 1.1.0, which depends on
ruby (>= 1.9.3)
bundler (= 1.17.3) was resolved to 1.17.3, which depends on
ruby (>= 1.8.7)
minitest was resolved to 5.16.3, which depends on
ruby (< 4.0, >= 2.6)
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
ruby (>= 2.2.2)
rspec-rails (~> 4.0.0) was resolved to 4.0.2, which depends on
ruby (>= 2.2.0)
sass was resolved to 3.7.4, which depends on
ruby (>= 2.0.0)
Bundler could not find compatible versions for gem "thinking-sphinx":
In Gemfile:
thinking-sphinx (= 3.4.2)
ts-resque-delta (~> 2.0.0) was resolved to 2.0.0, which depends on
thinking-sphinx (>= 1.5.0)
below is the Gemfile
source 'https://rubygems.org'
gem 'rails', '5.0.7.2'
gem 'bundler', '1.17.3'
gem 'etsy', '~> 0.2.5'
gem 'chargebee', '2.2.8'
gem 'rest-client', '~> 1.6.7'
gem 'mime-types', '>=1.16'
gem 'oauth', '~> 0.4.7'
gem 'packet', '>=0.1.10'
gem 'hash_extension', '>=0.0.4'
gem 'chronic', '>=0.2.3'
gem 'wicked_pdf', '~> 1.1.0'
gem 'xml-mapping', '=0.8.1'
gem 'money', '~> 6.13.8'
gem 'ey_config', '~> 0.0.6'
gem 'thinking-sphinx', '3.4.2'
gem 'ts-resque-delta', '~> 2.0.0'
gem 'rmagick', '2.16.0'
gem 'hpricot', '~> 0.8.6'
gem 'nokogiri'#, '1.5.0'
gem 'tlsmail', '0.0.1'
gem 'multipass', '~> 1.4.0'
gem 'spreadsheet', '1.0.0'
gem "mysql2", "0.3.18"
gem "rake"#, "10.1.1"
gem 'redis', '~> 3.3'
gem "typhoeus", "~> 0.6.3"
gem 'json'#, '~> 1.7.7'
gem 'gdata-19', '~> 1.1.2'
gem 'crack', '~> 0.4.1'
gem 'geokit', '1.6.7'
gem 'geokit-rails', '1.1.4'
gem 'resque', '~> 1.25'
gem 'resque_solo', "~> 0.3.0"
gem 'resque-scheduler', '~> 4.3.0'
gem 'rdoc', '~> 3.4'
gem 'diff-lcs', '1.1.3'
gem 'i18n', '~> 0.6'
gem 'whenever', :require => false
gem 'jslint', '~> 1.2.0'
gem 'jslint_on_rails', '~> 1.1.1'
gem 'haml', '3.1.6'
gem 'liquid', '~> 2.6.1'
gem 'cancan', '~> 1.6.10'
# gem 'devise', '1.0.10'
gem 'will_paginate', :path => './vendor/gems/will_paginate-master'
#, '~> 3.0.7'
#gem 'country_select', '~> 2.2.0'
# gem 'posix-spawn', :git => 'git://github.com/rtomayko/posix-spawn.git'
gem 'libxml-ruby'#, '~> 2.7.0'
gem 'newrelic_rpm', '~> 6.1.0.352'
gem 'exceptiontrap', '1.0.11'
#gem 'exception_notification', '4.4.0'
gem 'barby', '~> 0.6.2'
gem 'chunky_png', '~> 1.3.3'
#gem 'savon', '~> 2.0'
gem 'prestashop_integration', :path => './vendor/gems/prestashop_integration'
gem 'htmlentities', '~> 4.3.3'
gem 'gravatarify', '~> 3.0.0'
gem 'jquery-rails', '~> 3.1.2'
#gem 'dalli'
gem 'p3p', '~> 1.2'
gem "paperclip", "~> 3.0"
gem 'carrierwave', '1.3.1'
gem 'mousetrap-rails', :path => './vendor/gems/mousetrap-rails-master'
gem "recaptcha", require: "recaptcha/rails"
gem 'iso_country_codes'
gem 'acts_as_list', '0.9.19'
gem 'activemerchant', :git => 'https://github.com/activemerchant/active_merchant', :tag => 'v1.43.3'
gem "actionpack"
gem "countries"
gem 'easypost', '~> 2.7', '>= 2.7.1'
gem 'stripe', '3.28.0'
gem 'oauth2', '~> 1.0'
gem 'sass'
gem 'activerecord-session_store', '1.1.0'
gem 'activeresource', '~> 5.0'
gem 'country_select', '~> 3.1', '>= 3.1.1'
gem 'net-sftp', '~> 2.1', '>= 2.1.2'
gem 'oink'
gem 'rbnacl', '3.4.0'
gem 'bcrypt_pbkdf', '1.1.0'
#gem 'ar-octopus'
gem 'rotp'
gem 'makara', '~> 0.3.10'
group :development do
gem 'wkhtmltopdf-binary'
end
group :development, :test do
gem "test-unit"
gem "jasmine", "~> 1.3.2"
gem 'rspec'
gem 'rspec-rails', '~> 4.0.0'
gem 'autotest-rails-pure', "~> 4.1.2"
gem 'shoulda'
gem 'factory_bot', '4.11.1'
gem 'minitest'
gem "mocha"
gem 'fakeweb'
gem 'database_cleaner'
end
gem 'sass-rails', '~> 5.0.5'
gem 'coffee-rails', '~> 4.2.2'
gem 'uglifier', '~> 2.0.0'
gem 'simplecov', require: false, group: :test
Any help on how to fix this would be great, Thanks.
The advice not to specify versions in Gemfile is wrong.
You have go through each error and update other gems to versions compatible with rails 5.
An example:
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
activeresource (~> 5.0) was resolved to 5.1.1, which depends on
activemodel (< 7, >= 5.0)
carrierwave (= 1.3.1) was resolved to 1.3.1, which depends on
activemodel (>= 4.0.0)
paperclip (~> 3.0) was resolved to 3.5.4, which depends on
activemodel (>= 3.0.0)
rails (= 5.0.7.2) was resolved to 5.0.7.2, which depends on
activemodel (= 5.0.7.2)
Installed versions of carrierwave and paperclip are incompatible with activemodel 5.0, you have to update these two gems to be compatible with rails 5 (activemodel 5.0 precisely)
Same has to be done with other gems that are listed in your message.
Did some version bumps in Gemfile, even used special site RailsBumb, but still get long error message like:
Bundler could not find compatible versions for gem "actioncable":
In Gemfile:
action-cable-testing was resolved to 0.6.1, which depends on
actioncable (>= 5.0)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
actioncable (= 6.1.6)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
active_model_serializers (~> 0.10.13) was resolved to 0.10.13, which depends on
actionpack (< 7.1, >= 4.1)
activerecord-session_store (>= 1.1.1) was resolved to 2.0.0, which depends on
actionpack (>= 5.2.4.1)
inherited_resources was resolved to 1.13.1, which depends on
actionpack (< 7.1, >= 5.2)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
actionpack (= 6.1.6)
rails-controller-testing was resolved to 1.0.5, which depends on
actionpack (>= 5.0.1.rc1)
inherited_resources was resolved to 1.13.1, which depends on
responders (< 4, >= 2) was resolved to 3.0.1, which depends on
actionpack (>= 5.0)
rspec-rails was resolved to 5.1.2, which depends on
actionpack (>= 5.2)
slim-rails (~> 3.5.1) was resolved to 3.5.1, which depends on
actionpack (>= 3.1)
Bundler could not find compatible versions for gem "actionview":
In Gemfile:
rails (= 6.1.6) was resolved to 6.1.6, which depends on
actionview (= 6.1.6)
rails-controller-testing was resolved to 1.0.5, which depends on
actionview (>= 5.0.1.rc1)
web-console (>= 2.1.0) was resolved to 4.2.0, which depends on
actionview (>= 6.0.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
active_model_serializers (~> 0.10.13) was resolved to 0.10.13, which depends on
activemodel (< 7.1, >= 4.1)
paperclip (~> 6.1) was resolved to 6.1.0, which depends on
activemodel (>= 4.2.0)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
activemodel (= 6.1.6)
simple_form was resolved to 5.1.0, which depends on
activemodel (>= 5.2)
validate_url was resolved to 1.0.15, which depends on
activemodel (>= 3.0.0)
web-console (>= 2.1.0) was resolved to 4.2.0, which depends on
activemodel (>= 6.0.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord-nulldb-adapter (~> 0.8.0) was resolved to 0.8.0, which depends on
activerecord (< 7.1, >= 5.2.0)
activerecord-postgis-adapter (~> 7.0.0) was resolved to 7.0.1, which depends on
activerecord (~> 6.1)
activerecord-session_store (>= 1.1.1) was resolved to 2.0.0, which depends on
activerecord (>= 5.2.4.1)
annotate (~> 2.7.5) was resolved to 2.7.5, which depends on
activerecord (< 7.0, >= 3.2)
awesome_nested_set (~> 3.4.0) was resolved to 3.4.0, which depends on
activerecord (< 7.0, >= 4.0.0)
delayed_job_active_record (>= 4.1.5) was resolved to 4.1.7, which depends on
activerecord (< 8.0, >= 3.0)
jsonapi-resources was resolved to 0.11.0.beta1, which depends on
activerecord (>= 5.1)
paranoia (~> 2.2) was resolved to 2.6.0, which depends on
activerecord (< 7.1, >= 5.1)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
activerecord (= 6.1.6)
activerecord-postgis-adapter (~> 7.0.0) was resolved to 7.0.1, which depends on
rgeo-activerecord (~> 7.0.0) was resolved to 7.0.1, which depends on
activerecord (>= 5.0)
scoped_search (~> 4.1) was resolved to 4.1.10, which depends on
activerecord (>= 4.2.0)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
delayed_job (>= 4.1.10) was resolved to 4.1.10, which depends on
activesupport (< 8.0, >= 3.0)
factory_bot_rails was resolved to 6.2.0, which depends on
factory_bot (~> 6.2.0) was resolved to 6.2.1, which depends on
activesupport (>= 5.0.0)
paperclip (~> 6.1) was resolved to 6.1.0, which depends on
activesupport (>= 4.2.0)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
activesupport (= 6.1.6)
rails-controller-testing was resolved to 1.0.5, which depends on
activesupport (>= 5.0.1.rc1)
rspec-rails was resolved to 5.1.2, which depends on
activesupport (>= 5.2)
wicked_pdf (~> 1.1) was resolved to 1.4.0, which depends on
activesupport
Bundler could not find compatible versions for gem "listen":
In Gemfile:
listen (>= 3.0.5, < 3.2)
spring-watcher-listen (>= 2.0.1) was resolved to 2.0.1, which depends on
listen (< 4.0, >= 2.7)
Bundler could not find compatible versions for gem "omniauth":
In Gemfile:
omniauth (~> 1.0.3)
omniauth-vkontakte was resolved to 1.8.0, which depends on
omniauth-oauth2 (>= 1.5, <= 1.8.0) was resolved to 1.5.0, which depends on
omniauth (~> 1.2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.1.6)
paperclip-watermark was resolved to 1.0.0, which depends on
rails
rails-jquery-autocomplete (~> 1.0) was resolved to 1.0.5, which depends on
rails (>= 3.2)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
activerecord-session_store (>= 1.1.1) was resolved to 2.0.0, which depends on
railties (>= 5.2.4.1)
dotenv-rails was resolved to 2.7.6, which depends on
railties (>= 3.2)
factory_bot_rails was resolved to 6.2.0, which depends on
railties (>= 5.0.0)
inherited_resources was resolved to 1.13.1, which depends on
railties (< 7.1, >= 5.2)
jquery-rails (~> 4.3) was resolved to 4.5.0, which depends on
railties (>= 4.2.0)
jquery-ui-rails (~> 6.0) was resolved to 6.0.1, which depends on
railties (>= 3.2.16)
jsonapi-resources was resolved to 0.11.0.beta1, which depends on
railties (>= 5.1)
rails (= 6.1.6) was resolved to 6.1.6, which depends on
railties (= 6.1.6)
rspec-rails was resolved to 5.1.2, which depends on
railties (>= 5.2)
sass-rails (~> 6.0.0) was resolved to 6.0.0, which depends on
sassc-rails (>= 2.1.1, ~> 2.1) was resolved to 2.1.2, which depends on
railties (>= 4.0)
slim-rails (~> 3.5.1) was resolved to 3.5.1, which depends on
railties (>= 3.1)
web-console (>= 2.1.0) was resolved to 4.2.0, which depends on
railties (>= 6.0.0)
Tried dozens combinations of versions, but still this kind of error,
It looks like dead end, any ideas ?
Here is Gemfile
diff --git a/Gemfile b/Gemfile
index 638cd59..a973528 100644
--- a/Gemfile
+++ b/Gemfile
## -1,18 +1,20 ##
source 'https://rubygems.org'
+ruby "2.7.6"
+
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
-gem 'tzinfo-data'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 5.1.3'
+gem 'rails', '6.1.6'
+gem 'bootsnap', '>= 1.4.4', require: false
# Use sqlite3 as the database for Active Record
#gem 'mysql2', '~> 0.4'
# Use Puma as the app server
-gem 'puma', '~> 3.11'
+gem 'puma', '~> 5.6.4'
# Use SCSS for stylesheets
-gem 'sass-rails', '~> 5.0'
+gem 'sass-rails', '~> 6.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
## -22,10 +24,10 ## gem 'uglifier', '>= 1.3.0'
gem 'turbolinks'
#redis
-gem 'redis', '~> 3.2'
+gem 'redis', '~> 4.7'
#OmniAuth
-gem 'omniauth'
+gem 'omniauth', '~> 1.0.3'
gem 'omniauth-facebook'
gem 'omniauth-vkontakte', github: 'mamantoha/omniauth-vkontakte'
gem 'omniauth-mail_ru'
## -35,13 +37,15 ## gem 'omniauth-odnoklassniki'
gem "omniauth-yandex"
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f'
+gem 'actionpack', '6.1.6'
+
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'pry-rails'
# Adds support for Capybara system testing and selenium driver
- gem 'capybara', '~> 2.13'
- gem 'selenium-webdriver'
+ gem 'capybara', '~> 2.7.1'
+ gem 'selenium-webdriver'
gem 'dotenv-rails'
gem 'rails-controller-testing'
gem 'action-cable-testing'
## -49,11 +53,11 ## end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
- gem 'web-console', '>= 3.3.0'
+ gem 'web-console', '>= 2.1.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# 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'
+ gem 'spring', '< 3.0'
+ gem 'spring-watcher-listen', '>= 2.0.1'
end
group :test do
## -70,7 +74,7 ## gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'bcrypt', '~> 3.1'
# SLIM templates
-gem 'slim-rails', '~> 3.1'
+gem 'slim-rails', '~> 3.5.1'
# Admin forms
gem 'simple_form'
## -79,8 +83,8 ## gem 'inherited_resources'
gem 'validate_url'
# fixutres
-gem 'factory_bot_rails', '~> 4.8'
-gem 'database_cleaner', '~> 1.6'
+gem 'factory_bot_rails'
+gem 'database_cleaner', '<= 2.0.0.beta'
# TODO: remove this gem
# переменные окружения в application.yml
## -94,31 +98,31 ## gem 'wkhtmltopdf-binary', '~> 0.12'
# яндекс касса
gem 'yandex-money-sdk', '~> 1.0'
# хранение сессии в БД
-gem 'activerecord-session_store', '~> 1.1'
+gem 'activerecord-session_store', '>= 1.1.1'
# delayed_job
-gem 'delayed_job', '~> 4.1'
-gem 'delayed_job_active_record', '~> 4.1'
+gem 'delayed_job', '>= 4.1.10'
+gem 'delayed_job_active_record', '>= 4.1.5'
gem 'daemons', '~> 1.2'
# локализация
-gem 'i18n', '~> 0.9'
+gem 'i18n', '~> 1.10.0'
gem 'russian', '~> 0.6'
-
+
# Image upload
-gem 'paperclip', '~> 5.1'
+gem 'paperclip', '~> 6.1'
gem 'paperclip-watermark', :github => 'vikewoods/paperclip-watermark'
# JSON API
gem 'jsonapi-resources', github: 'cerebris/jsonapi-resources'
# Annotate models
-gem 'annotate', '~> 2.7', require: false
+gem 'annotate', '~> 2.7.5', require: false
gem 'webpacker', '~> 3.0'
gem 'rack-cors', '~> 1.0'
-gem 'active_model_serializers', '~> 0.10'
+gem 'active_model_serializers', '~> 0.10.13'
gem 'scoped_search', '~> 4.1'
# JavaScript libraries - remove after fully migrated to angular
## -134,18 +138,18 ## gem 'will_paginate', '~> 3.1'
gem 'will_paginate-bootstrap', '~> 1.0'
# needed to compile assets without database
-gem 'activerecord-nulldb-adapter', '~> 0.3'
+gem 'activerecord-nulldb-adapter', '~> 0.8.0'
# Localities tree structure
-gem 'awesome_nested_set', '~> 3.1'
+gem 'awesome_nested_set', '~> 3.4.0'
gem 'rgeo'
gem 'rgeo-proj4'
gem 'geocoder', '~> 1.4'
-gem 'activerecord-postgis-adapter', '~> 5.2.3'
+gem 'activerecord-postgis-adapter', '~> 7.0.0'
gem 'savon', '~> 2.12.0'
gem 'faraday'
# Authorization
-gem 'cancancan', '~> 2.0'
+gem 'cancancan', '~> 3.4.0'
# deploy
gem 'mina'
Upgrading from Rails 4.2.8 to Rails 5.0.2 results in the error message below. I am not sure how to resolve the dependencies. The ruby version is 2.5.1. I've been able to run this app and the test suite with Rails 4.2.8, though I have seen some excessive printing by a lower version of carrierwave, so I'd like to be able to upgrade that, but it requires Rails 5.
Error Message
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
actionpack-action_caching was resolved to 1.2.0, which depends on
actionpack (< 6, >= 4.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
actionpack (= 5.0.2)
simple_form was resolved to 4.1.0, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
carrierwave was resolved to 2.0.0, which depends on
activemodel (>= 5.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activemodel (= 5.0.2)
simple_form was resolved to 4.1.0, which depends on
activemodel (>= 5.0)
validate_url was resolved to 1.0.8, which depends on
activemodel (>= 3.0.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
friendly_id (~> 5.1.0) was resolved to 5.1.0, which depends on
activerecord (>= 4.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activerecord (= 5.0.2)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
active_hash (~> 1.4.1) was resolved to 1.4.1, which depends on
activesupport (>= 2.2.2)
carrierwave was resolved to 2.0.0, which depends on
activesupport (>= 5.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activesupport (= 5.0.2)
Bundler could not find compatible versions for gem "http":
In Gemfile:
http
twitter (~> 5.15.0) was resolved to 5.15.0, which depends on
http (< 0.10, >= 0.4)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 5.0.2)
interactor-rails (~> 2.0) was resolved to 2.2.0, which depends on
rails (< 5.3, >= 4.2)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 5.0.2) was resolved to 5.0.2, which depends on
railties (= 5.0.2)
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
railties (>= 5.2.0)
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
sprockets
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
sprockets (< 4.0, >= 2.8)
Gemfile
source 'https://rubygems.org'
ruby '2.5.1'
gem 'actionpack-action_caching'
gem 'active_hash', '~> 1.4.1'
gem 'avatars.io'
gem 'aws-sdk-s3', '~> 1'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'carrierwave'
gem 'carrierwave_direct'
gem 'coffee-rails', '~> 4.0.0'
gem 'compass-rails', '~> 2.0.2'
gem 'dalli'
gem 'devise'
gem 'diffy'
gem 'font-awesome-rails'
gem 'fog'
gem 'foundation-rails', '~> 5.5.3.2'
gem 'friendly_id', '~> 5.1.0'
gem 'haml'
gem 'html5shiv-js-rails'
gem 'http'
gem 'interactor-rails', '~> 2.0'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'pg'
gem 'puma', '~> 3.11.4'
gem 'rails', '5.0.2'
gem 'redcarpet'
gem 'rmagick'
gem 'ruby-mp3info', '>= 0.8.4'
gem 'sass-rails', '~> 5.0.1'
gem 'sidekiq'
gem 'sinatra', require: false
gem 'simple_form'
gem 'sprockets'
gem 'stamp'
gem 'twitter', '~> 5.15.0'
gem 'uglifier', '>= 1.3.0'
gem 'validate_url'
gem 'xml-simple', '~> 1.1.5'
gem 'will_paginate'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
end
group :production do
gem 'rails_12factor'
gem 'scout_apm'
gem 'sentry-raven'
# gem 'unicorn-worker-killer'
end
group :test do
gem 'factory_girl_rails'
gem 'm'
gem 'minitest-rails', '~> 2.2.0'
gem 'simplecov', '~> 0.9', require: false
gem 'timecop'
end
group :development, :test do
gem 'dotenv-rails'
gem 'pry'
gem 'awesome_print'
end
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
railties (>= 5.2.0)
railties 5.2 will conflict with the rest of Rails at 5.0 - you need to restrict sass-rails to < 5.0.8
back up your gemfile first and then try with this
source 'https://rubygems.org'
ruby '2.5.1'
gem 'actionpack-action_caching'
gem 'active_hash'
gem 'avatars.io'
gem 'aws-sdk-s3'
gem 'bootstrap-sass'
gem 'carrierwave'
gem 'carrierwave_direct'
gem 'coffee-rails'
gem 'compass-rails'
gem 'dalli'
gem 'devise'
gem 'diffy'
gem 'font-awesome-rails'
gem 'fog'
gem 'foundation-rails'
gem 'friendly_id'
gem 'haml'
gem 'html5shiv-js-rails'
gem 'http'
gem 'interactor-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'pg'
gem 'puma'
gem 'rails'
gem 'redcarpet'
gem 'rmagick'
gem 'ruby-mp3info'
gem 'sass-rails'
gem 'sidekiq'
gem 'sinatra', require: false
gem 'simple_form'
gem 'sprockets'
gem 'stamp'
gem 'twitter'
gem 'uglifier'
gem 'validate_url'
gem 'xml-simple'
gem 'will_paginate'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
end
group :production do
gem 'rails_12factor'
gem 'scout_apm'
gem 'sentry-raven'
# gem 'unicorn-worker-killer'
end
group :test do
gem 'factory_girl_rails'
gem 'm'
gem 'minitest-rails'
gem 'simplecov', require: false
gem 'timecop'
end
group :development, :test do
gem 'dotenv-rails'
gem 'pry'
gem 'awesome_print'
end
run
bundle update
I'm trying to setup docker for my project. I have tried installing actionpack 5.0.2, but it did not do me any good. I am following a tutorial on how to setup, so I reckon there are version issues. When I run docker-compose up, this is what I get:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.2) ruby depends on
actionpack (= 5.0.2) ruby
actionpack (>= 5.1.1, ~> 5.1) ruby
Here is my Gemfile:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'devise'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.2'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.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 ActiveModel has_secure_password
gem 'bcrypt', :platforms => :ruby
# 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', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'unicorn', '~> 4.9'
gem 'pg', '~> 0.18.3'
gem 'sidekiq', '~> 4.0.1'
gem 'redis-rails', '~> 4.0.0'
gem 'actionpack', '~> 5.1', '>= 5.1.1'
EDIT: Tried removing the gem actionpack entirely from the gemfile, caused new issues on docker-compose up:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.2) ruby depends on
actioncable (= 5.0.2) ruby depends on
actionpack (= 5.0.2) ruby
rails (~> 5.0.2) ruby depends on
actioncable (= 5.0.2) ruby depends on
actionpack (= 5.0.2) ruby
rails (~> 5.0.2) ruby depends on
actioncable (= 5.0.2) ruby depends on
actionpack (= 5.0.2) ruby
rails (~> 5.0.2) ruby depends on
actioncable (= 5.0.2) ruby depends on
actionpack (= 5.0.2) ruby
redis-rails (~> 4.0.0) ruby depends on
redis-actionpack (~> 4) ruby depends on
actionpack (~> 4) ruby
ERROR: Service 'drkiq' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 6
These two lines in your Gemfile are causing a dependency conflict:
gem 'rails', '~> 5.0.2'
gem 'actionpack', '~> 5.1', '>= 5.1.1'
~> 5.0.2 means "Greater than 5.0.2 and less than 5.1.0".
'~> 5.1', '>= 5.1.1' means "Greater than 5.1.1 and less than 6.0.0.".
Hence there is a conflict, and Bundler fails to resolve. You need to either upgrade rails or downgradeactionpack.
The easiest solution is probably to just remove actionpack from the Gemfile, since you don't really need to specify it at all. actionpack is a dependency of rails, so it will be installed regardless.
I would also suggest that you remove the '~> 5.0.2' version constraint on rails, unless you have a good reason to lock down the version number.
Update regarding your second error:
This error is very similar to the above; it's quite self-explanatory.
rails (~> 5.0.2) ruby depends on
[...]
actionpack (= 5.0.2) ruby
redis-rails (~> 4.0.0) ruby depends on
[...]
actionpack (~> 4) ruby
Just like above, you have one gem that depends on actionpack version v4.x.x, and another gem that depends on actionpack v5.0.2.
You need to somehow update/loosen the version constraint in your Gemfile. For example, you could write:
gem 'redis-rails', '~> 5.0'
You have specified to use actionpack greater or equal to 5.1:
gem 'actionpack', '~> 5.1', '>= 5.1.1'
However Rails 5.0.2 is specifically locked to actionpack 5.0.2. Remove the line above from your Gemfile, it's superfluous.
Apparently you have a dependency problem.
In your Gemfile try using:
gem 'rails', '~> 5.1.0'
gem 'actionpack', '~> 5.1.1'
I did a bundle install and bundle update and found that I keep getting the same error in the terminal:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
actionpack (~> 5.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form (~> 3.0.2) was resolved to 3.0.2, which depends on
actionpack (~> 4.0)
I updated a lot of the gems and got solved all the dependency errors but this one I can't seem to solve.
This is my gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0.5'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'simple_form', '~> 3.0.2'
gem 'devise', '~> 4.2'
gem 'haml', '~> 4.0.5'
group :development, :test do
gem 'byebug', platform: :mri
end
group :development do
gem 'web-console'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Is there something I'm missing from my gemfile to resolve this issue?
Apologies if this isn't explained very well, Im a newbie (and spent a few hours trying to solve this on my own!)
There are a lot information about dependencies in Gemfile and from Error.
railties (= 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form (~> 3.0.2) was resolved to 3.0.2, which depends on
actionpack (~> 4.0)
~> This limits versions to a subset of the possible versions. Read about it.
So from error you can read, that simple_form depends from actionpack, which can be only from 4.0 to 4.1 version. But railties depends on actionpack at least version 5.0.
To resolve this problem you must update simple_form gem. For example version 3.2.1 has next specification of actionpack:
s.add_dependency('actionpack', '> 4', '< 5.1')