Server can't access the SQLite database!

Discussion in 'Ruby/Rails' started by plato, Nov 29, 2007.

  1. plato

    plato Member


    I'm using SQLite3 as my database. I've setup my application and deployed it using capistrano. I'm running the application on Litespeed Server 3.3 and Rails edge. I can access the database through the rails console, so my configurations are fine. But as soon as the rails app tries to access the database the following exception is thrown:
    ActiveRecord::StatementInvalid (SQLite3::SQLException: SQL logic error or missing database
    I can't figure out why this exception is thrown. I'd appreciate any help.

  2. mistwang

    mistwang LiteSpeed Staff

    You can try closing the DB connection after the framework initialization.
    That's because ruby LSAPI will fork all children processes off the parent, file handles to SQLite db are inherited, may cause trouble when multiple processes try to access the DB using the same file handle.

    Another way to debug is to "strace/truss" the ruby process.

Share This Page