“Unable to Open Database” with Sqlite3
Just spent an hour or so trying to figure out why my Sinatra app running DataMapper couldn’t write to my sqlite database, and kept returning the vague error “Unable to Open Database”. Turns out the problem is as simple as making sure that the user running the script not only has write permissions on the database file, but also on the directory that the datbase file is in. If you find yourself getting this error and you can’t figure out why, that’s probably the problem!
Comments
Small internet, eh?
I have similar problem, but only if I do order_by in ActiveRecord.
This works : @posts = Post.find :all
This throws an error: @posts = Post.find :all, :order => 'created_at desc'
Small internet, eh?
I have similar problem, but only if I do order_by in ActiveRecord.
This works : @posts = Post.find :all
This throws an error: @posts = Post.find :all, :order => 'created_at desc'

Ade on April 27th, 2009