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 public/500.html >From the log: ActionView::TemplateError (uninitialized StringScanner object) on line #0 of app/views/admin/add_log.rhtml Here's the full error: http://yachttom.com/misc/rails_error.txt 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.
on 2006-12-22 03:44
on 2006-12-22 09:58
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: /usr/local/lib/ruby/1.8/i686-darwin8.7.1/strscan.bundle I would try reinstalling ruby possibly even compiling it yourself. You might also try posting this to the ruby list. Aaron
on 2007-02-18 09:55
I'm back, with a newly formatted drive and fresh Ruby and Rails installation as described here http://hivelogic.com/narrative/articles/ruby-rails... And the exact same problem. This is driving me absolutely nuts because each time the error occurs it totally breaks my app and I have to start with a fresh rails project, copy the code over, and try again until the same friggin thing happens again. Maddening! I'm thinking it has to be something specific to my application, so here are all the relevant files, I'm at your mercy: http://yachttom.com/misc/rails/ Most of the code is in the admin_controller.rb and admin/add_log.rhtml files. Basically this is supposed to take a url to a pdf of a day's worth of crime summaries, download and convert the pdf to text using rpdf2txt, then parse each line of the resulting text into an Incident object and save it to the database, and save the url and date in a separate database as a DailyLog object. It has worked fine in the past. I tried resurrecting it again after a few months, and it mostly worked except when the form is sent the data doesn't get seem to get passed here: @log = DailyLog.new(params[:log]) thus it isn't able to find the URL that was entered. The bigger problem was that the weird error mentioned in my first post came back and won't go away. Please please please take a moment to look over the code and see if there's any stupid errors or something else I'm missing. This is my first rails project and other than this ridiculously agravating error I really like it. Thank you, Tom Aaron wrote: > 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: > /usr/local/lib/ruby/1.8/i686-darwin8.7.1/strscan.bundle > > I would try reinstalling ruby possibly even compiling it yourself. You > might also try posting this to the ruby list. > > Aaron