JSON Dependency Conflict with Chef Gem

121 views
Skip to first unread message

Glenn Rempe

unread,
Mar 6, 2011, 3:33:56 PM3/6/11
to Vagrant
Hi,

I tried to use a Bundler Gemfile to specify the gems I wanted
installed in the RVM gemset for my Vagrant machine. I build up the
Vagrant machine using Chef.

However, it seems that the latest Vagrant and Chef gems are specifying
conflicting versions of the JSON gem which prevents bundler from being
able to install the gems.

glenn@mbp ~/src/thrillcall/tc-vagrant [ruby-1.9.2-p136@tc-vagrant]
[master*]$ bundle install
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "json":
In Gemfile:
chef (= 0.9.12) depends on
json (>= 1.4.4, <= 1.4.6)

vagrant (= 0.7.2) depends on
json (1.5.1)

Can you more flexibly specify a version >= 1.4.4 in the Vagrant
gemspec or do you *really* require JSON 1.5.1 *only*.

Thanks,

Glenn

AJ Christensen

unread,
Mar 7, 2011, 3:39:17 PM3/7/11
to vagra...@googlegroups.com
Yo,

This sucks.

There's a discussion on the Chef mailing list about JSON (& Chef::JSON
/ JSONCompat / Ohai::JSON / JSONCompat / mixlib-json)

Regards,

AJ

Jeroen van Dijk

unread,
Mar 8, 2011, 4:07:40 AM3/8/11
to vagra...@googlegroups.com, AJ Christensen
Hi guys,

Maybe I'm asking something silly here, but why would you need to have gem dependencies for Vagrant and Chef in the same Gemfile. I mean, Vagrant runs on the host and Chef runs on guest box, right? Different environments and therefore no need for one Gemfile.

Am I missing something?

Regards,

Jeroen

jasherai

unread,
Mar 8, 2011, 6:10:31 AM3/8/11
to Vagrant
> > > Fetching source index forhttp://rubygems.org/
> > > Bundler could not find compatible versions for gem "json":
> > >  In Gemfile:
> > >    chef (= 0.9.12) depends on
> > >      json (>= 1.4.4, <= 1.4.6)
>
> > >    vagrant (= 0.7.2) depends on
> > >      json (1.5.1)
>
> > > Can you more flexibly specify a version >= 1.4.4 in the Vagrant
> > > gemspec or do you *really* require JSON 1.5.1 *only*.
>
> > > Thanks,
>
> > > Glenn

Jeroen,

It is useful to have chef in your project Gemfile (Host) to be able to
use knife to manage your cookbook recipes etc.

hth,
Pritesh

Glenn Rempe

unread,
Mar 15, 2011, 3:23:40 PM3/15/11
to Vagrant
Jeroen,

For the answer to your question please see :
http://vagrantup.com/docs/provisioners/chef_solo.html

Cheers,

Glenn
> > > Fetching source index forhttp://rubygems.org/
Reply all
Reply to author
Forward
0 new messages