Vagrantをアップデートしてエラーになった話
Macで WordPressをVagrant環境にらくらくインストールする。 - VCCW - Qiita を参考にVCCWを使おうとするも、Vagrantが古いと言われ、アップデートしてハマった話。
アップデート
エラー
orz
$ vagrant --version Vagrant 1.8.1 $ vagrant status /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json/ext.rb:13:in `require': incompatible library version - /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json/ext/parser.bundle (fatal) from /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json/ext.rb:13:in `<module:Ext>' from /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json/ext.rb:12:in `<module:JSON>' from /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json/ext.rb:9:in `<top (required)>' from /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json.rb:58:in `require' from /Users/hoge/.vagrant.d/gems/gems/json-1.8.3/lib/json.rb:58:in `<module:JSON>' ...
やったこと
vagrantにバージョンアップをしたら動かなくなったのを修正する。 - Qiitaを参考に・・
$ sudo rm -rf ~/.vagrant.d/plugins.json ~/.vagrant.d/gems
3. statusが出るか確認
$ vagrant status Current machine states: default poweroff (virtualbox) The VM is powered off. To restart the VM, simply run `vagrant up`
4. 1で退避させていたplugins.jsonを元に、pluginを入れ直す
$ vagrant plugin install vagrant-omnibus sahara vagrant-triggers vagrant-hostsupdater
余談
Vagrant動くようになったぜヒャッハーーー とvagrant upするも、次はこんなエラーが・・
$ vagrant up ... ==> vccw.dev: Mounting shared folders... vccw.dev: /vagrant => /Users/hoge/src/vccw vccw.dev: /var/www/wordpress => /Users/hoge/src/vccw/www/wordpress vccw.dev: /tmp/vagrant-chef/f2071d0370e69e97e1771d22bd1e4895/cookbooks => /Users/hoge/src/vccw/provision/cookbooks vccw.dev: /tmp/vagrant-chef/3b49723cfa87d0d474d334465277c5e7/cookbooks => /Users/hoge/src/vccw/provision/site-cookbooks An error occurred in the underlying SSH library that Vagrant uses. The error message is shown below. In many cases, errors from this library are caused by ssh-agent issues. Try disabling your SSH agent or removing some keys and try again. If the problem persists, please report a bug to the net-ssh project. timeout during server version negotiating
んーーー
やったこと
v.customize ['modifyvm', :id, "--natdnshostresolver1", "off"]
をコメントアウトしてみたら起動できた。 というよりは、起動自体はしてるけど、chefのレシピが実行されてない感じ?(未確認)