Online diary/Journal program(OT)

Al Gordon runlevel7 at gmail.com
Wed May 31 19:59:21 UTC 2006


On 5/30/06, Wade Smart <wade at wadesmart.com> wrote:
>
>  05302006 1216 GMT-6
>
>  Look at Ruby On Rails

Good call.  You can quickly and easily create something like this in
RoR.  Here's an example that's ugly, but should work:

Create a database for the app to use:
mysqladmin -u root create diary_development

Create the rails app:
rails diary

Configure the app:
cd diary
./script/generate model diary_entry
nano db/migrate/001_create_diary_entries.rb

put the following 2 lines in the create_table section:

      t.column :entry_date, :date
      t.column :diary_entry, :text

Save and exit

Initialize the database schema:
rake migrate

Create a scaffold for your diary application:
./script/generate scaffold diary_entry

Start the Rails web/app server:
./script/server

point web browser at localhost:3000/diary_entries and start diary'ing!


This should work with the latest RoR.  I'm not sure if it'll work with
what's currently packaged in Ubuntu, however.  :P

-- 

  -- AL --




More information about the ubuntu-users mailing list