MacでLaravel4動かしてみた(`・ω・´)

f:id:greenwakame:20130411124215p:plain

公式URL : http://four.laravel.com/#install-composer

公式からLaravel4をダウンロード

ダウンロードしたフォルダ内に移動

curl -s http://getcomposer.org/installer | php

error message

` Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again

The detect_unicode setting must be disabled.
Add the following to the end of your php.ini
detect_unicode = Off

A php.ini file does not exist. You will have to create one.
If you can not modify the ini file, you can also run php -d option=value to modify ini values on the fly. You can use -d multiple times.`

error message end

上記のエラーは
php.ini ないよ、作成したら、detect_unicode = Off 追記して
ってことみたいです。

sudo cp /etc/php.ini.default /etc/php.ini

sduo chmod 777 /etc/php.ini

sudo vim /etc/php.ini

detect_unicode = Off 追記

curl -s http://getcomposer.org/installer | php
php composer.phar install

これで「Hello World」までいけました。

依存環境は composer.json に記述されているようです。
追加でパッケージなどを composer.phar でダウンロードするには
composer.json に記述すればいいのかな?

アプリケーション単位ではなく
グローバルに composer.phar を使いたい場合は
/usr/local/bin/ に composer.phar を移動させ
PATHを通せばいいと思います。