Sqilte3 test-case issue

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!


ruby test/unit/task_test.rb
Loaded suite test/unit/task_test
Finished in 0.163851 seconds.

  1. Error:
    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:
    SQLite3::SQLException: SQL logic error or missing database

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs