Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Gem Version dependency Issue #53

Open
mdere opened this issue Feb 1, 2016 · 6 comments
Open

Gem Version dependency Issue #53

mdere opened this issue Feb 1, 2016 · 6 comments
Labels

Comments

@mdere
Copy link

mdere commented Feb 1, 2016

Hey CC team!!

experiencing this current issue when I bundle install:

Bundler could not find compatible versions for gem "mime-types":
  In snapshot (Gemfile.lock):
    mime-types (= 1.25.1)

  In Gemfile:
    paperclip (>= 0) ruby depends on
      mime-types (>= 0) ruby

    stripe (>= 0) ruby depends on
      rest-client (~> 1.4) ruby depends on
        mime-types (< 3.0, >= 1.16) ruby

    rails (= 4.1.4) ruby depends on
      actionmailer (= 4.1.4) ruby depends on
        mail (~> 2.5.4) ruby depends on
          mime-types (~> 1.16) ruby

    constantcontact (~> 2.2.0) ruby depends on
      mime-types (>= 2.4.1, ~> 2.4) ruby

Then I tried bundle update:

Bundler could not find compatible versions for gem "mime-types":
  In Gemfile:
    rails (= 4.1.4) ruby depends on
      actionmailer (= 4.1.4) ruby depends on
        mail (~> 2.5.4) ruby depends on
          mime-types (~> 1.16) ruby

    constantcontact (~> 2.2.0) ruby depends on
      mime-types (>= 2.4.1, ~> 2.4) ruby

    mime-types (< 3.0, >= 1.16) ruby
@csciuto
Copy link
Contributor

csciuto commented Feb 1, 2016

Hello - is it an option to upgrade Rails a point release or so? ActionMailer 4.1.6 should support a higher version of Mime-Types: https://rubygems.org/gems/actionmailer/versions/4.1.6

@lorenzsell
Copy link

Are there any plans to update this gem to address this dependency issue? This question is two years old and this is still an problem.

@csciuto
Copy link
Contributor

csciuto commented Feb 16, 2018

What version of the SDK are you using? 4.0 removed the mime-type dependency: https://rubygems.org/gems/constantcontact/versions/4.0.0

If you need an older version for some reason, if it's possible for go from Rails 4.1.4 to 4.1.6 or later (assuming your problem is exactly the one above), the mime-type dependency conflict should also go away. Rails 4.1 is out of all support at this point.

@lorenzsell
Copy link

I'm using 4.1.0 and rails 5.1.1. This is the error I'm getting:

Bundler could not find compatible versions for gem "json":
  In snapshot (Gemfile.lock):
    json (= 1.8.6)

  In Gemfile:
    constantcontact (~> 4.1.0) was resolved to 4.1.0, which depends on
      json (~> 2.1)

    fog was resolved to 1.40.0, which depends on
      json (< 2.0, >= 1.8)

    raygun4ruby was resolved to 2.3.0, which depends on
      json

    fog was resolved to 1.40.0, which depends on
      fog-vsphere (>= 0.4.0) was resolved to 1.10.0, which depends on
        rbvmomi (~> 1.9) was resolved to 1.11.2, which depends on
          json (>= 1.8)

    sdoc (~> 0.4.0) was resolved to 0.4.2, which depends on
      json (>= 1.7.7, ~> 1.7)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

@csciuto
Copy link
Contributor

csciuto commented Feb 16, 2018

Oh, I see... so we went to json 2 a few releases ago as at the time, 1.x didn't look like it was still being developed. If I relax the dependencies to '>= 1.8' instead of '~> 2.1', you may be in luck here. If I force myself to use 1.8.x, My RSpec tests pass but that's as far as I got.

I'm no longer on the API team at Constant Contact, so I'm unsure when and if those changes can be more properly validated here and merged in, but if you are able to validate and issue a pull request it would be appreciated. I'll forward along to the team either way what the problem is here and apologies for the issues.

@lorenzsell
Copy link

That did indeed solve the problem for me. I issued a pull request. Thank you for the suggestion.

TheGravee added a commit that referenced this issue Feb 20, 2018
This will also allow JSON 2.x versions to be used so as to still support Rails 5.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants