Jeff Rasmussen’s Healthcare IT Blog

July 4, 2006

Getting Rails Environment Up and Running

Filed under: Ruby — jrasmussen0 @ 12:25 pm

I really liked how Planet Argon didn’t run postgres as a daemon/service but as an instance application for development. They used migrations to create the table structure so that the code can be ported back into the production environment or onto another developer’s laptop.

Here is the abridged steps for my own reference :) If you want detail read the full article below.

  1. initdb -D pgdata
  2. pg_ctl -D pgdata -l pgdata/psql.log start
  3. createdb argon_development
  4. psql argon_development
  5. rails -d postgresql argon
  6. cd argon
  7. ./script/generate model Argonista
  8. vi db/migrate/001_create_argonistas.rb
  9. vi config/database.yml
  10. rake db:migrate

Install Ruby, Rails, and PostgreSQL on OSX

I’m still not sure if I’ll go with Postgres or MySQL but these steps should work on both. In fact with a migration file, I think you can have developers using postgres and the server could be mysql. Although the development will want to decide on a database platform before making any database specific calls.

technorati tags:, , ,

Blog at WordPress.com.