Ruby woes: NameError and uninitialized constant

The thing I hate most about learning a new programming language is the time it takes to do the simplest things… something goes wrong and it takes hours to figure it. Sure, it’s worth it once you know but boy do I hate that time consuming learning process.

Meet today’s problem.

NameError in StoryController#index
uninitialized constant StoryController::Story
RAILS_ROOT: C:/Documents and Settings/sroot/My Documents/NetBeansProjects/scaffoldlearning
Application Trace | Framework Trace | Full Trace
C:/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing’
app/controllers/story_controller.rb:5:in `index’

Having spent 6 hours, googled as many variations as possible, I’ve finally tracked the problem is something to do with activesupport-2.0.2. I know this only because an earlier ruby program I created following a tutorial works without problem using the same code. When I purposefully break the earlier program, it’s error reads:

NameError in StoryController#index
uninitialized constant StoryController::Storys
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
C:/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in `const_missing’
#{RAILS_ROOT}/app/controllers/story_controller.rb:7:in `index’

A similar error message but on a different version of activesupport. Unfortunately I have no idea how to fix this (or downgrade my rails install, or know if it’s a good thing to downgrade my install – will that just break something else?), so that will now have to wait until tomorrow.

Spam filter that blocks the spam senders from RECEIVING email!

Interesting, I just tried to report spam to a company who I assume ran the campaign in good faith. The report got an unexpected response:

: host[] said: 554
    Service unavailable; Client host [] blocked using; was shut down on December 18, 2006. Please remove
    from your mailserver. (in reply to RCPT TO command)

Panic! One of our server IP’s got blacklisted as a spam source!….. phew, not the case (thank you slashdot), emailiq are filtering their email for spam using a blacklist database that shut down over a year ago. The blacklist have decided they gave enough notice to people filtering against their list, so from now on they are reporting every email checked as being spam. If you’re not getting email today, better check with your mail provider.

This company may not have meant to send spam, but because of spam they now have no email until the reconfigure their servers. Events like this show just how much spam is really costing everyone.

We featured on ITN National news


I’ve got a backlog of things I want to post, delayed by a backlog of things I need spend time on at work first, but this one jumps all the queues. Our family business (Roots Kitchens Bedrooms Bathrooms) was featured on ITN news as a small business case study. The wonders of modern technology mean you can see it on their web site.


The story that began it all is the CBI warning of ‘prolonged economic misery’. ITN asked if we’d give our view of the economy, both as a business and as individuals. They sent the reporter, cameraman and Satellite broadcast truck to us for the afternoon to film, edit and dispatch back in time for the evening news. They phoned to arrange it this around 11am, and it was broadcast across the nation during the 18:30 news programme. If only we could turn around kitchens that quick….

BBC iPlayer – it might reach your iPhone but not my PDA (…yet)

I’ve just come across an interesting article on boingboing (a web site with blog like posts related to computer things), it appears the BBC are trialling the iPlayer service to work to iPhones. BoingBoing noticed (or at least someone noticed and boingboing re-reported it) that they identify an iPhone by accepting the browsers name. They then send an MP4 video stream for your viewing pleasure.

There’s a couple of interesting things there:
1) There’s no “DRM” – the software technology that prevents you copying and sharing the file with others. I guess the thoughts are you’ll not be copying it because you’ll be ‘streaming’ the file and wont get to save it. You can download the file though, the article on boingboing explains how. I also imagine they’ve changed the screen size to suit an iPhone which is quite low quality for TV so it may not be too pleasant to watch on other screens anyway.
2) MP4’s can be played by my windows mobile 6 PDA/Phone. I’m not sure I can persuade my windows mobile browser to tell the BBC it’s an iPhone but the effort the BBC have gone to in trying this on an iPhone means that they may extend that to other platforms later.

Coining phrases: "Messenger Lag"

I wonder if there is a term in use called “Messenger Lag” or similar, meaning; the effect of having two or more differing conversations with the same person when typing over instant messaging services.

I’ve just been talking to my Mum on Messenger, she’s staying with my sister in Australia at the moment. Whenever we talk on messenger we have at least two simultaneous conversations. While I type the reply to one question she’ll start asking the next, or reply to a question from a couple of lines before. Sometimes that gets a little confusing… like this;

sharon says:Hi Steve,
Just about to go to bed – just checking you are okay?mum x
Steve Root says:i’m ok
Steve Root says:busy busy week
sharon says:thats good. lots of orders? or just work
Steve Root says:KBB in birmingham yesterday, kinetico tomorrow
Steve Root says:just busy with work, though dave did some orders yesterday
sharon says:sounds good
Steve Root says:i’ve had one survey this morning, one new measure this afternoon, margaret is jus tfinalising a bedroom for survey next week
sharon says:was kbb worth going to?
Steve Root says:may have found a good custom size door supplier, but I need to do more on bedrooms first
sharon says:any sliding wardrobes?
Steve Root says:long way to go though
Steve Root says:not worth having, current sliding doors are better
sharon says:where
Steve Root says:where what?
sharon says:you said a long way to go though
sharon says:so i said where
Steve Root says:Birmingham is a long way
sharon says:oh
sharon says:i thought you meant the supplier

When learning PHP I spent hours fixing errors simply because I forgot to put a semicolon ‘;’ at the end of a line

Creating my first Ruby on Rails application today I’ve just spent hours on one small part just because I forgot the equal ‘=’ sign in the view file where I wanted to see things

<% can anybody hear me? %>
<%= We hear you now Steve! %>