Rails on the Run

Rails experiments by Matt Aimonetti

Browsing Posts tagged mac

mac os X leopard

As many of you know, I’m a great RSpec and autotest fan.

Last night, I upgraded my MacBook to from Tiger to Leopard and I everything went very well… apart that Autotest stopped notifying me using Growl when my tests pass or fail :(

Growl itself works fine, even when using spaces.

However growlNotify, the Growl plugin used by autotest doesn’t seem to be Leopard compatible yet.

Just thought you guys should know that before upgrading.


I’m working on a Rails project and I need to make sure that our code is compatible with PostgreSQL. I never installed/used before and since I’m lazy and rely on other people knowledge, I decided to install Postgresql using MacPort.

It was actually simpler than I expected. I simply followed this post and almost everything went ok.

sudo port install postgresql81 +server

will install postgresql

sudo gem install postgres -- --with-pgsql-include-dir=/opt/local/include/postgresql81 --with-pgsql-lib-dir=/opt/local/lib/postgresql81

Will do a gem install

Start your server automatically by doing:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql81-server.plist
sudo launchctl start org.macports.postgresql81-server

Create a folder for your dbs
mkdir /opt/local/var/db/pgsql/data

Add pgsql to your path (I use textmate)

mate ~/.profile

My path looks like that:

export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:/opt/local/lib/postgresql81/bin/:$PATH

export PGDATA="/opt/local/var/db/pgsql/data/index.html"

restart your shell (or open a new tab) and type
initdb -D /opt/local/var/db/pgsql/data

Success. You can now start the database server using:

postmaster -D /opt/local/var/db/pgsql/data

pg_ctl -D /opt/local/var/db/pgsql/data -l logfile start

Now, create your db: $ createdb test -E utf8 or drop your newly created db: $ dropdb test

That’s it, it was easy.

more info from apple