cayman-5’s TechStudio

テクノロジーを源泉に世の中に本質的な価値のあるものを作り、浸透させたい。サービスの企画・開発からグロースまで一貫したプロダクトマネジメントが強み。価値を宿すプロダクト作りを信条に。グロースハック/プロダクトマネジメント/RaspberryPi/フィジカルコンピューティング/IoT/Rails/PHP/Python/Google Analytics/Google Tag Manager/Google Optimize エンジニアリングバックグラウンドで今はとあるIT企業で事業部長兼プロダクトマネージャ。個人

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を更新しなきゃいけなかったのか。

勉強になりました。