Tuesday, February 12, 2008

Akita on Rails Tutorial

Before I start, I will note that I tried to do a couple of tutorials before I created this blog and because of them being written for pre-2.0 it didn't work out so well, but I got a little bit of an introduction to Rails with them anyway, so I am not completely vanilla when it comes to Rails, just mostly so.

For my first tutorial, I decided to try Rolling with Rails 2.0 - The First Tutorial at AkitaonRails.com.

Now this tutorial assumes that you have used Rails before 2.0, but it seems to break everything down enough for me to know whats going on. I've made it to the section on Namespaced Routes, where I plan to pick back up tomorrow. So far I've not had any trouble besides a couple of typos I had to go back and fix.

A couple of notes:

The newest version of rails defaults to sqlite3 as the database, to force it to use mysql, when you create the project, use:

rails blog -d mysql

instead of:

rails blog

Also, since I'm on Windows(not by my choice, my computer at home runs Ubuntu), on lines where the tutorial runs something from the script folder:
./script/generate
./script/server

I had to use:

ruby script/generate
ruby script/server


Easy enough. I'll be updating this post tomorrow with the rest of part one of this tutorial.

EDIT: Tomorrow

Just finished up part one, adding in admin functionality using Namespaced Routes. Basically we set up all the routing for admin, and copied the views of what was already created, so that for admin rights, you would go to /admin/posts as opposed to /posts. Then we went to the views for the regular posts and stripped out the ability to add/delete/edit posts, and to delete/edit comments.

Alright now for my opinion of the tutorial:

While this was aimed for people with a little experience at Rails, Akita did a great job of not assuming we knew too much, making it easy to follow and understand what was going on.

The amount of effort that it takes to make a small web app such as this is amazing. This is as complicated as some projects that have taken me weeks to program in PHP (I never did learn CakePHP or any of the like). If I had known, I would have been using Rails a while ago. I would have moved on to the 2nd part of the tutorial, but the link seems to be down right now, so I guess it will wait until the next post.

No comments: