First sample Rails app working!

Wednesday, June 29 2005 @ 11:56 AM BST

Contributed by: robin

Ok, I finally got something working. I decided to work through the example in Dave Thomas' book 'Agile Web Development with Rails: A Pragmatic Guide'

(This book is not officially released until July 2005 but the authors have released a "beta" version in PDF format)

The example uses MySQL but I have translated the MySQL SQL code to Postgresql code.

Temp content:

This is the history of the commands I ran to create the sample depot app:

# cd /home/apache/
# rails depot
# chown -R apache:apache depot
# ln -s depot live
# cd depot/db
# vi create.mysql
# cp create.mysql create.pgsql
# vi create.pgsql

[created database and table using phpPgAdmin]

# cd ..
# vi config/database.yml

[Note: if the database config is not correct the scaffold generate fails]

# ruby script/generate scaffold Product Admin

Browse to

Yey! It works!

Comments (0)