YTsudaのブログ

1985生まれ、男。東京で働くWeb制作者

vagrant

vagrant up したら "Guest Additions Version" とに関するエラーが出た時のメモ

The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can cause things such as shared folders to not work properly. If you see shared folder errors, please update …

VagrantでマウントしたJavascriptファイルが文字化けする問題の対処法

環境 Vagrantで作ったVM内でNginxを走らせ、ホスト側のブラウザからリクエストしている。 アプリのソースファイルはホスト側からVMにマウントしている。 Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise 現象 ホス…

chefのレシピを開発する時はdebugモードで in Vagrant

chefのレシピを開発する時はdebugモードで行うと良いです。 例えばexecuteリソースを自分で書いた時、 only_if/not_if をテストするのに重宝します。 [2013-08-08T03:09:17+00:00] DEBUG: Skipping bash[update-locale] due to not_if command `cat /etc/def…

Vagrantで複数のcookbooksを指定する

chefのレシピは自作のものとサードパーティーのものを別のディレクトリに分けて入れることが推奨されています。 knifeでchefのプロジェクトを立ち上げると以下のようなディレクトリ構成になります。 cookbooks がサードパーティの、site-cookbooks が自家製…

Chef(Vagrant) で "apt-get update" する方法

vimがインストールできなかった Opscodeから引いてきたレシピで vim をインストールしようとしたのですが、以下のようなエラーが出てインストールできませんでした。 Chef::Exceptions::Exec ---------------------- apt-get -q -y install vim=2:7.3.429-2u…