Starting a Ruby on Rails Project

  • create a new app with `rails foo'
  • set up an ODBC DSN (in this case, called `mysql5la_rails') connecting to a database instance wherein there is a table `tests':

    create table tests (id integer primary key, str varchar(255), dob datetime);

  • from the foo/ directory, edit config/database.yml thus:

    development: adapter: odbc dsn: mysql5la_rails username: me password: whatever

  • run

    ruby script/generate scaffold admin tests

  • run

    ruby script/server

  • point your web-browser at http://localhost:3000/admin . You should now be seeing the Webrick server running and a display of the entries in the tests table, with links to edit / delete / create new rows.
ODBC-Rails and the ODBC-Rails website are Copyright (C) OpenLink Software 2006-2008