rubybundlerthorjquery-rails

Bundler could not find compatible versions for gem "thor", but it doesn't make any sense


When I run bundle update yesterday, it run without any problems, but today I'm getting this error:

Bundler could not find compatible versions for gem "thor":
  In Gemfile:
    rails (~> 3.2.17) ruby depends on
      railties (= 3.2.17) ruby depends on
        thor (< 2.0, >= 0.14.6) ruby

    jquery-rails (~> 2.1.4) ruby depends on
      thor (0.14.0)

That would make sense, except that jquery-rails 2.1.4 doesn't depend on thor 0.14.0, it depends on >= 0.14: https://rubygems.org/gems/jquery-rails/versions/2.1.4

Any ideas what's going on? Why does bundle believe thor depends on 0.14.0. Even in my Gemfile.lock it says:

jquery-rails (2.1.4)
  railties (>= 3.0, < 5.0)
  thor (>= 0.14, < 2.0)

My Gemfile contains this:

source "http://rubygems.org"

gem "acts_as_list"
gem "acts_as_tree"
gem "action_texter"
gem "activeadmin", group: [:development, :staging, :production]
gem "activerecord-tableless"
gem "best_in_place"
gem "breach-mitigation-rails"
gem "braintree"
gem "bootstrap-sass", "= 3.2.0.1"
gem "bugsnag"
gem "cancan"
gem "carrierwave"
gem "compass-rails"
gem "daemons"
gem "dalli"
gem "delayed_job"
gem "delayed_job_active_record"
gem "encrypted-cookies"
gem "fog"
gem "formtastic", "~> 2.3.0.rc2"
gem "font-awesome-rails"
gem "gctools"
gem "geocoder"
gem "geoip"
gem "gibbon"
gem "kaminari"
gem "haml"
gem "haml-rails"
gem "html5shiv-rails"
gem "intercom-rails"
gem "jquery-rails", "~> 2.1.4"
gem "librato-rails"
gem "liquid"
gem "meta_search"
gem "mimemagic"
gem "multitenant", git: "git://github.com/watu/multitenant.git"
gem "omniauth"
gem "omniauth-twitter"
gem "omniauth-facebook"
gem "paper_trail"
gem "pg"
gem "phone"
gem "pidfile"
gem "psych", "~> 2.0.5"
gem "rails", "~> 3.2.17"
gem "rake"
gem "remotipart", git: "git://github.com/watu/remotipart.git"
gem "random_unique_id", "~> 0.2.1"
gem "respond-rails"
gem "rdiscount"
gem "rmagick", require: "RMagick"
gem "rsolr"
gem "sanitize"
gem "sass-rails"
gem "sendgrid_toolkit"
gem "simple_form"
gem "stringex"
gem "sorcery", "= 0.8.5"
gem "unf"
gem "useragent"
gem "uuid"
gem "validation_auditor"
gem "watu_table_builder", require: "table_builder"

group :assets do
  gem "bootstrap-colorpicker-rails"
  gem "coffee-rails"
  gem "coffee-script-source"
  gem "modernizr-rails"
  gem "therubyracer"
  gem "turbo-sprockets-rails3"
  gem "uglifier"
end

# Production goodies.
gem "unicorn", group: [:staging, :production]
gem "unicorn-worker-killer", group: [:staging, :production]
gem "newrelic_rpm", group: [:staging, :production]
gem "rack-timeout", group: [:staging, :production] # We don't want timeouts while debugging.

group :test do
  gem "assert_difference"
  gem "capybara", "~> 1.1.2" # conflict?
  gem "minitest"  # conflict?
  gem "minitest-reporters"  # conflict?
  gem "minitest-rails"  # conflict?
  gem "mocha", require: "mocha/setup"
  gem "simplecov", require: false
  gem "ruby-prof"  # conflict?
  gem "shoulda-context"
  gem "shoulda-matchers"
end

group :development do
  gem "better_errors"
  gem "binding_of_caller"
  gem "capistrano", require: false
  gem "capistrano-bundler", ">= 1.1.0", require: false # conflict?
  gem "capistrano-rails", require: false  # conflict?
  gem "capistrano-rvm", require: false, github: "capistrano/rvm"  # conflict?
  gem "capistrano-maintenance", require: false, github: "capistrano/maintenance"  # conflict?
  gem "sqlite3", require: false # Required by taps to download db
  gem "taps", require: false
  gem "annotate"
  gem "git", require: false
  gem "quiet_assets"
  gem "yard", require: false
  gem "meta_request"
end

gem "bundler-audit", group: [:development, :test]
gem "timecop", group: [:development, :test]
gem "factory_girl", group: [:development, :staging, :test]
gem "factory_girl_rails", group: [:development, :staging, :test]
gem "mail_safe", group: [:development, :staging]
gem "pry-rails", group: :development

If I comment out the lines marked with # conflict? then running bundler update works, but I still haven't found the minimal set of gems that cause the error.


Solution

  • Adding:

    gem "thor", "~> 0.19.1"
    

    to my Gemfile solved the problem. I think there some sort of infinite loop as it took for ever to run bundle update when it was going to fail.