# Sqilte3 test-case issue

**URL:** <https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448>\
**Category:** Rails\
**Created:** [January 29, 2008, 10:09am UTC](https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448 "2008-01-29T10:09:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![myst\_tt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@myst\_tt](https://www.ruby-forum.com/u/myst_tt)\
**Post date:** [January 29, 2008, 10:09am UTC](https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448/1 "2008-01-29T10:09:52Z")

</div>

Hi, there:  
My environment: rails 2.02, sqlite3, ruby 1.8.6  
I am stucked at my first test-case running. Everything about  
database works fine in development environment. however, I ran “rake  
db:test:prepare” and then I tried the default generated test-case, it  
errors as follow. I checked in test.sqlite3, the table does exist  
(and all blank).  
Any clues? Thanks in advance!

Br,  
MyST

* * *

ruby test/unit/task\_test.rb  
Loaded suite test/unit/task\_test  
Started  
EE  
Finished in 0.163851 seconds.

1. Error:  
test\_truth(CommentTest):  
ActiveRecord::StatementInvalid: SQLite3::SQLException: table tasks has  
no column named time: INSERT INTO tasks (“updated\_at”, “time”,  
“price”, “title”, “number”, “id”, “description”, “created\_at”) VALUES  
(‘2008-01-29 10:50:21’, ‘2007-12-31’, 1, ‘MyString’, 1, 996332877,  
‘MyText’, ‘2008-01-29 10:50:21’)  
…

2. Error:  
test\_truth(CommentTest):  
SQLite3::SQLException: SQL logic error or missing database  
…

---

<div class="post-metadata">

**Author:** ![myst\_tt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@myst\_tt](https://www.ruby-forum.com/u/myst_tt)\
**Post date:** [March 22, 2008, 9:25am UTC](https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448/2 "2008-03-22T09:25:57Z")

</div>

I am having the same problem as you are, I have two tables and cannot  
unit test either of them. Can anyone help?
