安装jekyll后gem install jekyll
,我的vagrant命令失败并显示:
$ 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>
我需要什么作为临时解决方法(变量在中声明~/.bashrc
):
$ unset GEM_HOME GEM_PATH
现在,我可以跑了vagrant
。避免此类问题的最终解决方案是什么?
解决方案是删除声明
这足够了: