Após a instalação do jekyll com gem install jekyll
, meus comandos vagrant falham com:
$ vagrant up
/usr/lib/ruby/vendor_ruby/rubygems.rb:265:in `find_spec_for_exe': can't find gem vagrant (>= 0.a) with executable vagrant (Gem::GemNotFoundException)
from /usr/lib/ruby/vendor_ruby/rubygems.rb:284:in `activate_bin_path'
from /usr/bin/vagrant:25:in `<main>'
/usr/lib/ruby/vendor_ruby/rubygems.rb:265:in `find_spec_for_exe': can't find gem vagrant (>= 0.a) with executable vagrant (Gem::GemNotFoundException)
from /usr/lib/ruby/vendor_ruby/rubygems.rb:284:in `activate_bin_path'
from /usr/bin/vagrant:25:in `<main>'
/usr/lib/ruby/vendor_ruby/rubygems.rb:265:in `find_spec_for_exe': can't find gem vagrant (>= 0.a) with executable vagrant (Gem::GemNotFoundException)
from /usr/lib/ruby/vendor_ruby/rubygems.rb:284:in `activate_bin_path'
from /usr/bin/vagrant:25:in `<main>'
/usr/lib/ruby/vendor_ruby/rubygems.rb:265:in `find_spec_for_exe': can't find gem vagrant (>= 0.a) with executable vagrant (Gem::GemNotFoundException)
from /usr/lib/ruby/vendor_ruby/rubygems.rb:284:in `activate_bin_path'
from /usr/bin/vagrant:25:in `<main>'
$ LANG=C dpkg -l vagrant
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-====================-============-==========================================================>
ii vagrant 2.2.19+dfsg-1ubuntu1 all Tool for building and distributing virtualized development>
O que eu preciso como solução temporária (as variáveis são declaradas em ~/.bashrc
):
$ unset GEM_HOME GEM_PATH
Agora, eu sou capaz de correr vagrant
. Qual é a solução definitiva para evitar esse tipo de problema?