voxpupuli / json-schema

Ruby JSON Schema Validator
MIT License
1.52k stars 242 forks source link

Unable to activate json-schema-2.6.2, because addressable-2.4.0 conflicts with addressable (~> 2.3.8) #356

Closed neilyoung closed 7 years ago

neilyoung commented 7 years ago

Hi,

for some reasons I have addressable 2.3.8 as well as 2.4.0 installed. This leads to the error mentioned above. Do you know a way around?

Regards

iainbeeston commented 7 years ago

Can you please give an example to help us reproduce this? It sounds like you're not using bundler (which should resolve this kind of dependency issue for you)

iainbeeston commented 7 years ago

I'm going to close this for lack of information.

neilyoung commented 7 years ago

Sorry for not responding. I didn't get a notification for your first response.

Yes, I'm using bundler.

The first project, depending on addressable, is "slate" https://github.com/lord/slate. This uses bundler. Then I have an heroku hosted ruby sinatra project, which has a gemfile containing a reference to your json-scheme

gem 'json-schema'

The issue now is, that middleman - a requirement installed with slate - depends on addressable 2.4.0. This confilcts with the a.m. error, whenever I try to test my ruby app locally.

What I'm doing then (and what is a good workaround) is to uninstall addressable 2.4.0 whenever I want to test my ruby script which is using 2.3.8 (w/o further intervention BTW):

gem uninstall addressable --version=2.4.0

Then I'm able to work with your schema. Whenever I need slate again I re-install addressable 2.4.0 by issuing

bundler install

in the slate directory.

Both work, but jus mutually exclusive.

iainbeeston commented 7 years ago

Try json-schema 2.7.0 - that supports addressable 2.4

neilyoung commented 7 years ago

Right, that fixed it. Thanks

PeishuaiLee commented 6 years ago

json-schema 2.8.0 s.add_runtime_dependency "addressable", '>= 2.4' can i use "addressable",'2.3.8' instead

iainbeeston commented 6 years ago

@PeishuaiLee I'm afraid not - addressable 2.4.0 changed the API for some of the addressable methods we use, and supporting both would have added complexity. Addressable 2.4.0 was released over 18 months ago - is something preventing you from upgrading addressable?