Bundle update and bundle install fail on a ruby on rails (4.2.4) application with bundler 1.10.6

Viewed 32

I am trying to bundle update. I am using ruby 2.2.3p173. This is my Gemfile:

source 'https://rubygems.org'

gem 'rails', '~> 4.2.4'

gem 'pg', '~> 0.18.3'
gem 'sass-rails', '~> 5.0.4'
gem 'uglifier', '~> 2.7.2'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails', '~> 4.0.5'
gem 'jscrollpane-rails', '~> 2.0.22'
gem 'jquery-mousewheel-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'

gem 'paperclip', '~> 4.3.1'
gem 'RedCloth'
gem 'bower-rails', '~> 0.7.3'
gem 'dependor'
gem 'active_model_serializers', '~> 0.9.3'

gem 'pg_search', '~> 0.7.3'
gem 'select2-rails', '~> 4.0.0'
gem 'dotenv-rails', '~> 2.0.2'

gem 'newrelic_rpm', '~> 3.14.0.305'

group :development, :test do
  gem 'byebug'
  gem 'spring'
  gem 'letter_opener'
  gem 'pry'
  gem 'web-console', '~> 2.2'
end

group :development do
  gem 'capistrano-rvm',   '~> 0.1', require: false
  gem 'capistrano', '~> 3.4.0', require: false
  gem 'capistrano-rails',   '~> 1.1', require: false
  gem 'capistrano-bundler', '~> 1.1', require: false
  gem 'capistrano-passenger', '~> 0.1.1', require: false
end

group :test do
  gem "codeclimate-test-reporter", require: nil
  gem 'rake', '~> 10.4.2'
  gem 'rspec-rails', '~> 3.1'
  gem "factory_girl_rails", "~> 4.0"
  gem 'json_spec'
end

I get this in return (all red):

 bundle update
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies......
Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      actionpack (= 4.2.11.3)

    rspec-rails (~> 3.1) was resolved to 3.9.1, which depends on
      actionpack (>= 3.0)

Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    active_model_serializers (~> 0.9.3) was resolved to 0.9.8, which depends on
      activemodel (>= 3.2)

    paperclip (~> 4.3.1) was resolved to 4.3.7, which depends on
      activemodel (>= 3.2.0)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activemodel (= 4.2.11.3)

    web-console (~> 2.2) was resolved to 2.3.0, which depends on
      activemodel (>= 4.0)

Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    pg_search (~> 0.7.3) was resolved to 0.7.9, which depends on
      activerecord (>= 3.1)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activerecord (= 4.2.11.3)

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    factory_girl_rails (~> 4.0) was resolved to 4.9.0, which depends on
      factory_girl (~> 4.9.0) was resolved to 4.9.0, which depends on
        activesupport (>= 3.0.0)

    jbuilder (~> 2.0) was resolved to 2.9.1, which depends on
      activesupport (>= 4.2.0)

    paperclip (~> 4.3.1) was resolved to 4.3.7, which depends on
      activesupport (>= 3.2.0)

    pg_search (~> 0.7.3) was resolved to 0.7.9, which depends on
      activesupport (>= 3.1)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activesupport (= 4.2.11.3)

    rspec-rails (~> 3.1) was resolved to 3.9.1, which depends on
      activesupport (>= 3.0)

    spring was resolved to 2.0.2, which depends on
      activesupport (>= 4.2)

Bundler could not find compatible versions for gem "arel":
  In Gemfile:
    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activerecord (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        arel (~> 6.0)

    pg_search (~> 0.7.3) was resolved to 0.7.9, which depends on
      arel

Bundler could not find compatible versions for gem "capistrano":
  In Gemfile:
    capistrano (~> 3.4.0)

    capistrano-passenger (~> 0.1.1) was resolved to 0.1.1, which depends on
      capistrano (~> 3.0)

    capistrano-rails (~> 1.1) was resolved to 1.6.2, which depends on
      capistrano (~> 3.1)

Bundler could not find compatible versions for gem "i18n":
  In Gemfile:
    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activesupport (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        i18n (~> 0.7)

    capistrano (~> 3.4.0) was resolved to 3.4.1, which depends on
      i18n

Bundler could not find compatible versions for gem "json":
  In Gemfile:
    codeclimate-test-reporter was resolved to 1.0.9, which depends on
      simplecov (<= 0.13) was resolved to 0.13.0, which depends on
        json (< 3, >= 1.8)

    uglifier (~> 2.7.2) was resolved to 2.7.2, which depends on
      json (>= 1.8.0)

Bundler could not find compatible versions for gem "mimemagic":
  In Gemfile:
    paperclip (~> 4.3.1) was resolved to 4.3.7, which depends on
      mimemagic (= 0.3.0)

Could not find gem 'mimemagic (= 0.3.0)', which is required by gem 'paperclip (~> 4.3.1)', in any of the sources.

Bundler could not find compatible versions for gem "net-ssh":
  In Gemfile:
    capistrano (~> 3.4.0) was resolved to 3.4.1, which depends on
      sshkit (~> 1.3) was resolved to 1.21.3, which depends on
        net-scp (>= 1.1.2) was resolved to 3.0.0, which depends on
          net-ssh (< 7.0.0, >= 2.6.5)

    capistrano (~> 3.4.0) was resolved to 3.4.1, which depends on
      sshkit (~> 1.3) was resolved to 1.21.3, which depends on
        net-ssh (>= 2.8.0)

Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      actionpack (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        rack (~> 1.6)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      actionpack (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        rack-test (~> 0.6.2) was resolved to 0.6.3, which depends on
          rack (>= 1.0)

    sass-rails (~> 5.0.4) was resolved to 5.0.7, which depends on
      sprockets (< 4.0, >= 2.8) was resolved to 3.7.2, which depends on
        rack (< 3, > 1)

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 4.0.0) was resolved to 4.0.1, which depends on
      railties (< 5.0, >= 4.0.0)

    dotenv-rails (~> 2.0.2) was resolved to 2.0.2, which depends on
      railties (~> 4.0)

    factory_girl_rails (~> 4.0) was resolved to 4.9.0, which depends on
      railties (>= 3.0.0)

    jquery-rails (~> 4.0.5) was resolved to 4.0.5, which depends on
      railties (>= 4.2.0)

    jscrollpane-rails (~> 2.0.22) was resolved to 2.0.23, which depends on
      railties (>= 3.1)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      railties (= 4.2.11.3)

    rspec-rails (~> 3.1) was resolved to 3.9.1, which depends on
      railties (>= 3.0)

    sass-rails (~> 5.0.4) was resolved to 5.0.7, which depends on
      railties (< 6, >= 4.0.0)

    web-console (~> 2.2) was resolved to 2.3.0, which depends on
      railties (>= 4.0)

Bundler could not find compatible versions for gem "rake":
  In Gemfile:
    rake (~> 10.4.2)

    capistrano (~> 3.4.0) was resolved to 3.4.1, which depends on
      rake (>= 10.0.0)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      railties (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        rake (>= 0.8.7)

Bundler could not find compatible versions for gem "ruby":
  In Gemfile:
    ruby

    byebug was resolved to 10.0.2, which depends on
      ruby (>= 2.2.0)

    codeclimate-test-reporter was resolved to 1.0.9, which depends on
      ruby (>= 1.9)

    pry was resolved to 0.14.1, which depends on
      coderay (~> 1.1) was resolved to 1.1.3, which depends on
        ruby (>= 1.8.6)

    active_model_serializers (~> 0.9.3) was resolved to 0.9.8, which depends on
      concurrent-ruby (~> 1.0) was resolved to 1.1.10, which depends on
        ruby (>= 2.2)

    uglifier (~> 2.7.2) was resolved to 2.7.2, which depends on
      json (>= 1.8.0) was resolved to 2.5.1, which depends on
        ruby (>= 2.0)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      activesupport (= 4.2.11.3) was resolved to 4.2.11.3, which depends on
        minitest (~> 5.1) was resolved to 5.15.0, which depends on
          ruby (< 4.0, >= 2.2)

    newrelic_rpm (~> 3.14.0.305) was resolved to 3.14.0.305, which depends on
      ruby (>= 1.8.7)

    paperclip (~> 4.3.1) was resolved to 4.3.7, which depends on
      ruby (>= 1.9.2)

    letter_opener was resolved to 1.8.1, which depends on
      launchy (< 3, >= 2.2) was resolved to 2.4.3, which depends on
        addressable (~> 2.3) was resolved to 2.8.1, which depends on
          public_suffix (< 6.0, >= 2.0.2) was resolved to 4.0.7, which depends on
            ruby (>= 2.3)

    rails (~> 4.2.4) was resolved to 4.2.11.3, which depends on
      ruby (>= 1.9.3)

    sass-rails (~> 5.0.4) was resolved to 5.0.7, which depends on
      sass (~> 3.1) was resolved to 3.7.4, which depends on
        ruby (>= 2.0.0)

If I delete the Gemfile.lock and run bundle install I get the same result. How can I fix that ?

My Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    RedCloth (4.2.9)
    actionmailer (4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.4)
      actionview (= 4.2.4)
      activesupport (= 4.2.4)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    active_model_serializers (0.9.3)
      activemodel (>= 3.2)
    activejob (4.2.4)
      activesupport (= 4.2.4)
      globalid (>= 0.3.0)
    activemodel (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
    activerecord (4.2.4)
      activemodel (= 4.2.4)
      activesupport (= 4.2.4)
      arel (~> 6.0)
    activesupport (4.2.4)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.3.6)
    arel (6.0.3)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bower-rails (0.7.3)
    builder (3.2.2)
    byebug (6.0.2)
    capistrano (3.4.0)
      i18n
      rake (>= 10.0.0)
      sshkit (~> 1.3)
    capistrano-bundler (1.1.4)
      capistrano (~> 3.1)
      sshkit (~> 1.2)
    capistrano-passenger (0.1.1)
      capistrano (~> 3.0)
    capistrano-rails (1.1.5)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    capistrano-rvm (0.1.2)
      capistrano (~> 3.0)
      sshkit (~> 1.2)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.7)
      climate_control (>= 0.0.3, < 1.0)
    codeclimate-test-reporter (0.4.8)
      simplecov (>= 0.7.1, < 1.0.0)
    coderay (1.1.0)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.8.0)
    colorize (0.7.7)
    debug_inspector (0.0.2)
    dependor (1.0.1)
    diff-lcs (1.2.5)
    docile (1.1.5)
    dotenv (2.0.2)
    dotenv-rails (2.0.2)
      dotenv (= 2.0.2)
      railties (~> 4.0)
    erubis (2.7.0)
    execjs (2.6.0)
    factory_girl (4.5.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.5.0)
      factory_girl (~> 4.5.0)
      railties (>= 3.0.0)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    i18n (0.7.0)
    jbuilder (2.3.2)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-mousewheel-rails (0.0.9)
      railties (>= 3.1)
    jquery-rails (4.0.5)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jscrollpane-rails (2.0.22)
      railties (>= 3.1)
    json (1.8.3)
    json_spec (1.1.4)
      multi_json (~> 1.0)
      rspec (>= 2.0, < 4.0)
    launchy (2.4.3)
      addressable (~> 2.3)
    letter_opener (1.3.0)
      launchy (~> 2.2)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    method_source (0.8.2)
    mime-types (2.6.2)
    mimemagic (0.3.0)
    mini_portile (0.6.2)
    minitest (5.8.2)
    multi_json (1.11.2)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (3.0.1)
    newrelic_rpm (3.14.0.305)
    nokogiri (1.6.6.4)
      mini_portile (~> 0.6.0)
    paperclip (4.3.1)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (= 0.3.0)
    pg (0.18.3)
    pg_search (0.7.9)
      activerecord (>= 3.1)
      activesupport (>= 3.1)
      arel
    pry (0.10.1)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    rack (1.6.4)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.4)
      actionmailer (= 4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      activemodel (= 4.2.4)
      activerecord (= 4.2.4)
      activesupport (= 4.2.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.4)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
    railties (4.2.4)
      actionpack (= 4.2.4)
      activesupport (= 4.2.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    rspec (3.3.0)
      rspec-core (~> 3.3.0)
      rspec-expectations (~> 3.3.0)
      rspec-mocks (~> 3.3.0)
    rspec-core (3.3.2)
      rspec-support (~> 3.3.0)
    rspec-expectations (3.3.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.3.0)
    rspec-mocks (3.3.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.3.0)
    rspec-rails (3.3.3)
      actionpack (>= 3.0, < 4.3)
      activesupport (>= 3.0, < 4.3)
      railties (>= 3.0, < 4.3)
      rspec-core (~> 3.3.0)
      rspec-expectations (~> 3.3.0)
      rspec-mocks (~> 3.3.0)
      rspec-support (~> 3.3.0)
    rspec-support (3.3.0)
    sass (3.4.19)
    sass-rails (5.0.4)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    select2-rails (4.0.0)
      thor (~> 0.14)
    simplecov (0.10.0)
      docile (~> 1.1.0)
      json (~> 1.8)
      simplecov-html (~> 0.10.0)
    simplecov-html (0.10.0)
    slop (3.6.0)
    spring (1.2.0)
    sprockets (3.4.0)
      rack (> 1, < 3)
    sprockets-rails (2.3.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sshkit (1.7.1)
      colorize (>= 0.7.0)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.1)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    web-console (2.2.1)
      activemodel (>= 4.0)
      binding_of_caller (>= 0.7.2)
      railties (>= 4.0)
      sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
  ruby

DEPENDENCIES
  RedCloth
  active_model_serializers (~> 0.9.3)
  bower-rails (~> 0.7.3)
  byebug
  capistrano (~> 3.4.0)
  capistrano-bundler (~> 1.1)
  capistrano-passenger (~> 0.1.1)
  capistrano-rails (~> 1.1)
  capistrano-rvm (~> 0.1)
  codeclimate-test-reporter
  coffee-rails (~> 4.0.0)
  dependor
  dotenv-rails (~> 2.0.2)
  factory_girl_rails (~> 4.0)
  jbuilder (~> 2.0)
  jquery-mousewheel-rails
  jquery-rails (~> 4.0.5)
  jscrollpane-rails (~> 2.0.22)
  json_spec
  letter_opener
  newrelic_rpm (~> 3.14.0.305)
  paperclip (~> 4.3.1)
  pg (~> 0.18.3)
  pg_search (~> 0.7.3)
  pry
  rails (~> 4.2.4)
  rake (~> 10.4.2)
  rspec-rails (~> 3.1)
  sass-rails (~> 5.0.4)
  select2-rails (~> 4.0.0)
  spring
  turbolinks
  uglifier (~> 2.7.2)
  web-console (~> 2.2)

BUNDLED WITH
   1.10.6
1 Answers

Not sure if this will solve your problem, but try installing the last 1.x bundler version

gem install bundler -v 1.17.3

which still should work with ruby 2.2/rails 4.2, also upgrade to 2.2.10, the last ruby 2.2 patch version.
The only fixable conflict I could see is where paperclip can't find the mimemagic version as 0.3.0 was removed. There's a fix to relax that restriction, but you won't see that up to paperclip 5.0.0.beta1, so consider to upgrade to paperclip 5.x as it seems there are no breaking changes for that version.
Finally, I have the feeling you should try bundle install first, then move to update anything later.

Related