sudo pecl install --alldeps xdebug
sudo vi /opt/local/etc/php.ini
[xdebug]
zend_extension=/opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.remote_enable = On
xdebug.profiler_enable = On
後はphpinfoでxdebugが有効になっているのを確認
sudo pecl install --alldeps xdebug
sudo vi /opt/local/etc/php.ini
[xdebug]
zend_extension=/opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.remote_enable = On
xdebug.profiler_enable = On
export PATH=/opt/local/bin:/opt/local/sbin/:$PATH
export MANPATH=/opt/local/man:$MANPATH
export LANG=ja_JP.UTF-8
sudo port -d selfupdate
sudo port -d sync
sudo port install postgresql83
sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist
sudo port clean --all sqlite3
sudo port install sqlite3
sudo port install php5 +apache2 +curl +gd +pear +postgresql83 +sqlite3
sudo cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf
sudo cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
ここで以下のエラーがでるが無視。httpd.confに書き込めなかったようだ。
unable to open configuration file
sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini
sudo vi /opt/local/apache2/conf/httpd.conf
本来ならこの行の追加でいいはずだが、前述のエラーのせいかうまくいかないので
Include conf/extras-conf/mod_php.conf
上記をやめて、以下の行を追加
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir /opt/local/etc/php.ini
sudo /opt/local/apache2/bin/apachectl restart
sudo port -d selfupdate
sudo port -d sync
sudo gem update --system
sudo gem install rails
sudo gem update rake
sudo gem update sqlite3-ruby
gem list
gem server