Strange "Application error"

This error is driving me crazy. I would really appreciate if someone
could shed some light on it.

I have a simple app with a couple models and a controller and a view.
It starts out working fine, then I start getting these vague errors
whenever I try to load anything except for the "Ruby on Rails: Welcome
Aboard" page (it won't even display "action not found" etc, brand new
fresh controllers don't work either)

Displayed in browser:

Application error, Change this error message for exceptions thrown
outside of an action (like in Dispatcher setups or broken Ruby code) in

From the log:

ActionView::TemplateError (uninitialized StringScanner object) on line
#0 of app/views/admin/add_log.rhtml

Here's the full error:

The really strange thing is if I make a fresh rails project and copy
the exact same code into the new project, it works fine for awhile then
does the exact same thing again.

Any idea what's going on? I might just be doing something stupid but I
can't figure out what...

Thank you.

This is more of a guess than anything else but I think you might a have
a problem with your ruby setup. The error your getting "uninitialized
StringScanner object" does not appear anywhere in rails and I've never
seen a rhtml file fail on line #0.

On my machine that error message is in a binary file called
strscan.bundle in this location:

I would try reinstalling ruby possibly even compiling it yourself. You
might also try posting this to the ruby list.