I was working on a project, and suddenly, any invocation to anything Ruby seems stopped working. All of them report missing dependencies.
I was uninstalling unrelated C/C++ -dev libraries before that, could be the cause because I didn't do anything else I would suspect.
I have tried reinstalling chefdk.deb (downloaded), I did sudo gem update --system
which changed (looks like improved) the stack trace, but the error is still the same:
05:56 ~/work/doc/cook 1$ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'net-scp' (~> 1.1) among 266 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/ondra/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1468:in `block in activate_dependencies'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `each'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `activate_dependencies'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1439:in `activate'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:310:in `block in activate_bin_path'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `synchronize'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `activate_bin_path'
from /usr/local/bin/kitchen:23:in `<main>'
What should I do?
Ok so after sleeping well, I realized it is telling me it just can't find some library. So I started installing them, starting with sudo gem install net-scp
.
I'm not sure though why they got uninstalled and why chef didn't install them with it's package.
05:56 ~/work/doc/cook 1$ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'net-scp' (~> 1.1) among 266 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/ondra/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1468:in `block in activate_dependencies'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `each'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `activate_dependencies'
from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1439:in `activate'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:310:in `block in activate_bin_path'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `synchronize'
from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `activate_bin_path'
from /usr/local/bin/kitchen:23:in `<main>'
05:56 ~/work/doc/cook 1$ sudo gem install net-scp
[sudo] password for ondra:
Fetching: net-scp-1.2.1.gem (100%)
Successfully installed net-scp-1.2.1
Parsing documentation for net-scp-1.2.1
Installing ri documentation for net-scp-1.2.1
Done installing documentation for net-scp after 0 seconds
1 gem installed
14:43 ~/work/doc/cook $ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'ffi' (>= 1.0.1) among 267 total gem(s) (Gem::MissingSpecError)
Checked in...
14:43 ~/work/doc/cook $ sudo gem install ffi berkshelf
...
15:09 ~/work/doc/cook 127$ kitchen
Commands: