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

berks-api fails due to json gem version conflict #281

Closed
zts opened this issue Dec 29, 2014 · 2 comments
Closed

berks-api fails due to json gem version conflict #281

zts opened this issue Dec 29, 2014 · 2 comments

Comments

@zts
Copy link

zts commented Dec 29, 2014

On Ubuntu 14.04, installed "chefdk_0.3.5-1_amd64.deb".
This package includes the berkshelf-api gem (version 1.4.0), which fails like so:

kitchen@6637c2938ed7:~$ eval "$(chef shell-init bash)"
kitchen@6637c2938ed7:~$ which berks-api
/opt/chefdk/embedded/bin/berks-api
kitchen@6637c2938ed7:~$ berks-api -v
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2087:in `check_version_conflict': can't activate json-1.7.7, already activated json-1.8.1 (Gem::LoadError)
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1278:in `activate'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:90:in `block in require'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:89:in `each'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:89:in `require'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.1.0/lib/ridley.rb:7:in `<top (required)>'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-api-1.4.0/lib/berkshelf/api.rb:4:in `<top (required)>'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-api-1.4.0/lib/berkshelf/api/srv_ctl.rb:66:in `start'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-api-1.4.0/lib/berkshelf/api/srv_ctl.rb:52:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-api-1.4.0/bin/berks-api:5:in `<top (required)>'
    from /opt/chefdk/embedded/bin/berks-api:23:in `load'
    from /opt/chefdk/embedded/bin/berks-api:23:in `<main>'

Updating to the latest version appears to work:

kitchen@6637c2938ed7:~$ chef gem update berkshelf-api
Updating installed gems
Updating berkshelf-api
Fetching: berkshelf-api-2.1.0.gem (100%)
Successfully installed berkshelf-api-2.1.0
Parsing documentation for berkshelf-api-2.1.0
Installing ri documentation for berkshelf-api-2.1.0
Installing darkfish documentation for berkshelf-api-2.1.0
Done installing documentation for berkshelf-api after 0 seconds
Parsing documentation for berkshelf-api-2.1.0
Done installing documentation for berkshelf-api after 0 seconds
Gems updated: berkshelf-api
kitchen@6637c2938ed7:~$ berks-api -v
2.1.0
@zts
Copy link
Author

zts commented Dec 29, 2014

Actually, updating the gem allows berks-api -v to return, but actually starting the server continues to fail with the same error.

@danielsdeleo
Copy link
Contributor

berks-api is just installed for testing, it's not a core component that we appbundle, so you probably have to run it with bundler if you need it.

@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants