[Rails] Sqlite3 test fails in Rails app
Luke Antins
luke at lividpenguin.com
Thu Jun 15 23:30:14 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I am using Sqlite3 database with my Rails app. When I try and run
> "rake
> tests" for the app it always fails with the error:
<snip>
> /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader
> Started
> E/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/
> errors.rb:94:in
> `check': SQL logic error or missing database (SQLite3::SQLException)
> from
<snip>
I had a similar problem Tyler, hopefully this will help you...
Go into your `tests/test_helper.rb' and disable transactional fixtures.
self.use_transactional_fixtures = false
You should now see some errors that are less cyrptic then
'SQLite3::SQLException'.
Use this information to try and solve your problem.
Myself, I had an error about the tables not existing! A quick hack to
the `config/environment.rb` file fixed that...
if ENV["RAILS_ENV"] == "test"
load "#{RAILS_ROOT}/db/schema.rb"
end
I'll try and look into this a little deeper later on today.
Hope this helps!
Luke Antins
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFEke2cf6ZEiY4w2wYRAsg1AJ9M8pqhvJds2jzzV53YAHKbyx5G9gCfZdU6
k17iTWVdG2PqC/kIeaiHHBo=
=s0li
-----END PGP SIGNATURE-----
More information about the Rails
mailing list