Aug 22, 2008
Generic-user-small Martin Hawkins 2 posts

Topic: Agile Web Development with Rails / Installing Rails on Ubuntu

I’m posting this here because I was following the instructions on p36 of the pdf. This could just as well go on the Rails Talk Group or on a Ubuntu list.
I’m completely new to Linux, having suffered with Windows for too long. I’ve just installed Ubuntu Hardy Heron on my laptop and I was following the instructions on p36 (to the letter!).
All seemed to be going well until I tried reinstalling to Rails v2.02 and updating gem to 1.20. Since then, I’m getting an error –
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)
I’ve tried purging and reinstalling to no avail.
Is this a problem in the book or have I messed up?

thanks
Martin

 
Apr 25, 2008
Generic-user-small Martin Hawkins 2 posts

Topic: Agile Web Development with Rails / %r{\.(gif|jpg|png)$}i, What does the i do?

v2, p85:
validates_format_of :image_url,
:with => %r{\.(gif|jpg|png)$}i,
:message => “must be a URL for a GIF, JPG, or PNG image”

What does the “i” do at the end of the second line? I’ve tried it without and it seems to run fine.

2 posts