johnreilly

www.flickr.com
john.reilly's items Go to john.reilly's photostream

Posts tagged "database"

sqlite3-ruby-1.2.2 and rails == no good

Tonight I fired up a new rails app to play with… did my initial git stuff, ran script/console for the first time, fired up localhost:3000, etc etc.

Everything was going so smoothly.  Until I hit the “About your app’s environment” link on the default index page.  Observe the pinkish horror:

Here’s the relevant error text (for google to index):

MissingSourceFile in Rails/infoController#properties

no such file to load -- sqlite3/database
RAILS_ROOT: /Users/john/src/trms/cam

This error occurred while loading the following files:
   sqlite3
   sqlite3/database

Nasty.

Turns out, this isn’t a huge deal to fix.  Just prior to railsing up my new app, I had updated all of my installed gems, which included the latest sqlite3-ruby gem (ver 1.2.2). After doing a bit of research, I discovered 1.2.2 doesn’t play nicely with rails.

Oookay fine, downgrading is easy:

$ sudo gem uninstall sqlite3-ruby -v=1.2.2
Password:
Successfully uninstalled sqlite3-ruby-1.2.2

This put me back to 1.2.1. Running script/console once again proved the workingness had returned.

Bottom line, make sure your latest and greatest sqlite3-ruby gem is no higher than version 1.2.1. I’m not sure what the problem is with 1.2.2, but this worked for me, hopefully it helps someone else as well.

Update Aug 28 2008

Word on the street is that the recently released sqlite-ruby-1.2.3 fixes this issue. Haven’t had a chance to try it myself, but people report success.

Comments (View)