VCCWで開発環境作ろうとしたらvagrant-hostsupdaterがインストールできなくてハマった件
いやーはまったはまった。
上記タイトルの通りローカルのMacにVCCW環境作ろうとしてVagrant pluginのvagrant-hostsupdaterがインストールできなくてはまってました。
VCCWについては下記記事に説明お願いするとして
VCCWでWordPressの本番環境とローカル環境を同じにする - Memo/
WordPressでのシステム開発にVCCWとWordMoveを使おう! | artisan edge thinking
gitでVCCWに必要なファイル群をcloneしてきて
必須プラグインらしいvagrant-hostsupdaterを入れようと以下のコマンドを実行しようとすると
vagrant plugin install vagrant-hostsupdater
このエラーに直面。
Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that gem install rake -v '10.4.2'
succeeds before bundling.
Gem::RemoteFetcher::FetchError: bad response Not Found 404 (http://gems.hashicorp.com/gems/rake-10.4.2.gem)
gem install rake -v '10.4.2'
実行しても直らず
色々調べてみると
XcodeのCommand Line Toolsのせいだとか
Vagrantのバージョンが古いからだとか
gemのバージョンのせいだとか
色々と情報が出てくるがどれも解決には至らず。。。。。
そしてvagrant-hostsupdaterどころかvagrant plugin updateすら同じエラーでうまくいかず。。。。
解決策
gem install --install-dir ~/.vagrant.d/gems rake -v '10.4.2'
これで無事vagrant plugin install vagrant-hostsupdaterが通るようになりました。
なるほどー。
/.vagrant.d/ディレクトリ直下のgemを更新しなきゃいけなかったのか。
勉強になりました。