Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Conflict error with manually including JSON gem #105

Closed
mikeyoungyoung opened this issue Sep 21, 2016 · 8 comments
Closed

JSON Conflict error with manually including JSON gem #105

mikeyoungyoung opened this issue Sep 21, 2016 · 8 comments

Comments

@mikeyoungyoung
Copy link

I have an issue using the contactful.rb gem. Error below:
/Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2284:inraise_if_conflicts': Unable to activate contentful-1.0.0, because json-2.0.2 conflicts with json (~> 1.8) (Gem::ConflictError)
from /Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1407:in activate' from /Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:196:inrescue in try_activate'
from /Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:193:in try_activate' from /Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:125:inrescue in require'
from /Users/michael.young/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require' from app.rb:7:in

'`

When I try and pull back content through irb it runs fine, but in my sinatra app where I have also manually included json I see the above error

@dlitvakb
Copy link
Contributor

Hey @mikeyoungyoung,

Sadly the fixed json dependency is in order to support older versions of Ruby.

We're considering removing this dependency and deprecating Ruby versions < 2.0 soon, but sadly this is not currently possible.

I'd recommend you to for the moment create a fork without this hard dependency and use it from there or use a local copy of the gem with the json dependency removed.

Hope this helps, and hope we can get this solved on the mainstream release soon.

Cheers

@dlitvakb
Copy link
Contributor

Hwy @mikeyoungyoung,

#106 removes the hard dependency on json.

Hope that helps

Cheers

@mikeyoungyoung
Copy link
Author

perfect! works for me

@mikeyoungyoung
Copy link
Author

@dlitvakb any idea when that will be? No rush on my side, just curious as to when I should be changing

@dlitvakb
Copy link
Contributor

dlitvakb commented Oct 4, 2016

@mikeyoungyoung we will be releasing today, only a very small refactor pending after review 😄

@dlitvakb
Copy link
Contributor

dlitvakb commented Oct 4, 2016

@mikeyoungyoung 1.0.1 has been released 😄

Cheers

@rohanschari
Copy link

After executing calabash-android run test.apk

Unable to activate calabash-android-0.9.0, because json-2.0.2 conflicts with json (~> 1.8) (Gem::ConflictError)
/usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2288:in raise_if_conflicts' /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1408:in activate'
/usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:220:in rescue in try_activate' /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:213:in try_activate'
/usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:126:in rescue in require' /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in require'
/home/apmosys/VED/CreditCardValidator.AndroidStudio/SimpleCreditCardValidator/features/support/env.rb:1:in <top (required)>' /usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in load'
/usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in load_code_file' /usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in load_file'
/usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in block in load_files!' /usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in each'
/usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in load_files!' /usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in load_step_definitions'
/usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in run!' /usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in execute!'
/usr/local/rvm/gems/ruby-2.4.0/gems/cucumber-2.4.0/bin/cucumber:8:in <top (required)>' /usr/local/rvm/gems/ruby-2.4.0/bin/cucumber:22:in load'
/usr/local/rvm/gems/ruby-2.4.0/bin/cucumber:22:in `

'

@dlitvakb
Copy link
Contributor

Hey @rohanschari,

Looks like your issue is with either cucumber or some other gem, there's no hard requirement on the json gem any more.

Either update to a newer version or make sure that there's no other conflicting gem in your project.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants