Follow the Yellow Brick Road
June 28
There, Ray. Happy? Anyway, getting into the development of Ruby on Rails does kind of seem like a trip to see the Wizard. I didn’t pick up any scarecrows, tin men, lions, or wicked witches, but I did pick up a lot of other stuff.
To start with, I had to get my machines up and working well. My Linux machine was already running Apache, PHP and MySQL (Standard Query Language, but I needed to add Ruby, RubyGems and, last but not least Ruby on Rails to it. I downloaded and compiled all of them from source and eventually got everything up and running, except I couldn’t get the server to give me Ruby pages, so I used the Ruby on Rails-native server, WEBrick. That worked fine for a day or so.
Now I’ve decided I want faster access to my Ruby stuff, so I’ve set it up on my iBook. All of the software listed above, plus FastCGI to speed up delivery a bit. It seems to be streaming along nicely, with my 256mb of RAM only taking a bit of a hit from running both the Apache2 and MySQL servers.
So, now I have to start learning, right? Yeah, that was my thought, too. So I started on the tutorials. I worked through all of Rolling with Ruby on Rails tutorial and part of the second installment of it before that script went belly up. I think this isn’t a fluke as Manny had the same problem I did. That was Sunday on the Linux box.
Yesterday, Monday, I sat down on my Rails-serving iBook and worked through “How to Make a (small) Publication Management App (RoR Wiki)”http://manuals.rubyonrails.com/read/chapter/48#page132 and it worked for awhile. I noticed a lot of errors where the author seemed to be reading/referencing a different tutorial/script. Finally it stopped working near the end and I just gave up on it. Still, learned some more syntax and some gotchas.
Today was the next trial, I guess. I sat down this morning to work through a tutorial I had seen yesterday during my browsing. How to Make a Todo List Program with Rails and it worked perfectly. I know. I’m as amazed as you are! Heh, no, it’s a great tutorial and the author is really good at explaining what each line/command does.
After completing it (probably took about 2 hours total), I decided to try and expand upon it. I wanted to add a bit more information to each item by adding a due date to it. Obviously some elements wouldn’t have a due date, so I had to address that as well. So I added two new fields to my MySQL table for each of those and started working.
After a few hours and some head=>desk banging, I managed to get it working just like I want. Big thanks to the people in #rubyonrails on irc.freenode.net, too. They pointed me in the right direction a few times. I then started styling it with CSS and it looks good. It’s a blatant rip on 37Signals, but I don’t care.
So, maybe tomorrow’ll bring another app. I’m thinking of a social application, actually. Mad Libs + Introductory Questionnaire. Any name ideas?