Rails 2.0.1 Todo List tutorial

I’ve been meaning to try Rails 2.0.1, and I had some trouble finding an example. I did find this one, which is quite good.

I thought I would add one of my own. Here in five lines are the steps to create a basic todo list application in rails.

rails todo
cd todo
rake db:create:all
script/generate scaffold Todo title:string body:text done:boolean due:datetime
rake db:migrate

Then start the web server
script/server

Open your browser to http://localhost:3000/todos

You can now create, edit and Delete items. Wow. Not one SQL command.

This tutorial assumes the following:
ralis 2.0.1 installed
running mysql with no password for root at localhost.
(And it was also made on a Macbook OS X Leopard).

This entry was posted in Uncategorized. Bookmark the permalink.

12 Responses to Rails 2.0.1 Todo List tutorial

  1. Pingback: Top Secret Project » Blog Archive » Why Rails is better than whatever it is you use: ToDo List in 5 Lines

  2. Paul Kavanagh says:

    That is just the ticket! I have been struggling to make a site because of the changes in scaffold and routing, and this example got me through it.

  3. keith murphy says:

    great example! it’s nice to start with the basics and work your way up to the more complicated examples. a great “Hello, world” example. Thanks for putting this up.

  4. Roger Gordon says:

    Thanks very much for this. I thought I’d never get Ruby working until this app. I can’t believe how quick and easy that was!

  5. Jason says:

    Nice and thank you. I used the following to to get this up and running with sqlite3:
    rails -d sqlite3 todo
    cd todo
    rake db:create:all
    script/generate scaffold Todo title:string body:text done:boolean due:datetime
    rake db:migrate
    script/server

  6. noah says:

    um…. yeah, thanks Rob. I really don’t know what to say its just pretty.

  7. Pingback: Ruby on Rails Tutorials (version 2.0+ compatible)

  8. Pingback: Ruby on Rails Tutorials (version 2.0+ compatible)

  9. Shijiree says:

    Excellent !!!

  10. Pingback: HPLogsdon» Blog Archive » Configuring Mongrel and Mongrel Cluster

  11. dfjskj says:

    wow this is the greatest thing ever! Simple and easy. Im telling everyone i know about this!!!!!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *