Saturday, January 26, 2008

Practically Rails

I'm spending some time learning Ruby and Rails. The Web today belongs to those that can implement ideas (not just dream them). So I've been dusting off my OO and C++ knowledge which I hadn't used for about 10 years (it's all coming back pretty easily).

I've invested in a couple of books on the subject and one of them is Practical Rails Applications by Eldon Alameda from Apress. From time to time, I'm going to post typos, errata and other notes here as part of this journey.

  • Pg36: The index page that is produced for the today controller with Rails 2.0.2 is index.html.erb instead of index.rhtml The book references and older version.
  • Pg41: The text thats displayed at the end of script/plugin install acts_as_authenticated plugin looks like an error but its not (that part about acts_as being deprecated by restful_authentication).
  • Pg44: paragraph 3 "we're using it [to] call the login_from_cookie
Last night, I got as far as adding user registration and authentication (using the plug in acts_as_authenticated) in chapter 3 of the book. I ran into a few problems related to the mailer initialization. At the same time, I was tracking down a pesky layout issue on the login and signup pages, unrelated to the mailer issue, when I emailed the author, Eldon Alameda. Eldon responded right away and has been very helpful...

It turns out that the book was written based on Rails 1.2.3 while I was running 2.0 Among the changes is the ActionMailer initialization. So to keep moving forward, I decided to downgrade from InstantRails 2.0 back to InstantRails 1.7 and Rails 1.2.8 (close enough to 1.2.3). A lesson learned for being on the bleeding edge (Rails 2.0 was released late Dec - too new for my taste).

I am redoing the steps starting in Chapter 1.

Here's a trap I fell into a couple of times (the last time around, this was the fork in the road that took me down the path to upgrading to Rails 2.0
which proved problematic): You've just installed mongrel and you're all happy and snug and you do mongrel_rails start to see the fruits of your labor but you see this instead !!! Path to log file not valid: log/mongrel.log

Chances are, your mongrel is installed alright. The thing to remember is that mongrel_rails must run from within a rails app directory (if you use InstantRails and you haven't created a project of your own, go to cookbook or typo sample app directories and start mongrel there. Presto!

My current configuration: Ruby 1.8.6 Rails 1.2.3 mongrel 1.1
gem 0.9.2 rake 0.7.2 apache 1.3.33

Read more...

Friday, January 25, 2008

A fly in my cloud-computing ointment

So I've been happily using Gmail and Google Calendar (along with Google Docs) and enjoying my cloud computing bliss without Microsoft Office and Outlook.

Starting yesterday, however, Google Calendar has been acting-up for me on Firefox 2.0 running Windows XP. Note that the problem doesn't happen on IE (which I have also gave up on a while back).

The problem I am having is as follows - unfortunately - and this has rendered Google Calendar unusable under Firefox :(

I start Gmail and click on Calendar and the Ajax thing starts to happen... the lower left hand corner of the browser starts to show frantic activity (contacting google.com etc) and Firefox hour glass is there - all looks normal - EXCEPT I never come out of this state. Sometimes, I get the Calendar login screen often not. It just sits there...

I tried rebooting... restarting firefox... uh-ah, not working and that sucks!

Worse comes to worse, I am planning to move to an Apple MacBook soon and maybe/probably that will solve this issue. Just waiting for the new MacBook Pros with multi-touch...



Google Calendar not happning on FireFox from roupen nahabedian on Vimeo.

Read more...

Thursday, January 24, 2008

A Microsoft Moment sans Office & Outlook

I was at a meeting over lunch yesterday when one of my Vaio laptops started acting-up; I'd turn it on, Windows (XP) would boot-up I'd login and after a minute or two the blue screen of death would flash and the laptop would reboot. This happened about 5-6 times - different boot options didn't seem to make a difference - I was having a "Microsoft Moment" (MM).

This seems to happen about once every 6 months that you have to take time off, drop what you're doing, and pay homage to the gods of software and fix the problem... Normally, a MM is enough to ruin your day - you don't know if your documents and email are safe (you think to yourself "am i ever going to see my email ever again?" or "my god - all that STUFF that I can't live without"). And of course, you could/should have backed-up the stuff but...

Luckily this time around, I am no longer using Office nor Outlook - I made the transition a couple of months ago and I haven't looked back. Also this time around, the stress was much lower: my stuff and majority of my documents are on gmail and Google docs respectively. Saved!

I remembered that this kind of crash had happened on this laptop about a year ago and the solution then was to reinstall from the factory CD and wipe everything out. So not only was my stress level much less but when it came down to doing a clean-install, the whole process took about 1/3 as long since there was so much less to copy off and copy back on (at last check, my Outlook file was about 10GB).

So! A Microsoft Moment made much less stressful and painful not having Outlook and Office to deal with. Next stop? Back to an Apple Powerbook not to deal with Windows at all.

Read more...

Sunday, January 20, 2008

Mayhem-5


Mayhem-5
Originally uploaded by Almighty_Tuna
Ha? Watch me touch this mouse trap with my tongue... in the next photo, the trap closes on his tongue - ouch! The series gets worse, ending with people stapling dollar bills to his body (ha?)

DISCLAIMER: I came across this pic on a random walk on Flickr. I wasn't attending this event or anything.

Read more...