# Trouble running Unit tests with sqlite3

**URL:** <https://www.ruby-forum.com/t/trouble-running-unit-tests-with-sqlite3/105636>\
**Category:** Rails\
**Created:** [May 31, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/trouble-running-unit-tests-with-sqlite3/105636 "2007-05-31T22:08:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nexos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df705f/32.png) [@Nexos](https://www.ruby-forum.com/u/Nexos)\
**Post date:** [May 31, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/trouble-running-unit-tests-with-sqlite3/105636/1 "2007-05-31T22:08:09Z")

</div>

Hi,

I’m using an sqlite3 database with Rails and have some trouble running  
unit tests

I created some models/migrations in my dev DB, then ran a “rake  
db:test:prepare” that correctly created the test database.

The problem is that, but when I want to run a (any) test, I get a "SQL  
logic error or missing database (SQLite3::SQLException). I can however  
access the DB via the sqlite3 client without any problem.

I’m using Rails 1.2.3 with ruby 1.8.5, sqlite3.3.7 and sqlite3-ruby  
(1.2.1) Excerpt from my DB configuration (database.yml) : test:  
adapter: sqlite3 database: db/myApp\_test.sqlite3

Any help would be greatly appreciated!

Thanks in advance.

Frédéric Delanoy
