On Mon, Mar 21, 2011 at 11:14 PM, Hashbang Hashbang <li...@ruby-forum.com>wrote:
> Hi! > > I've got a very strange problem. Suddenly the SQLite3 Backend stopped > working. > > Example 1: > > > rake db:rollback > > == CreateProducts: reverting > ================================================= > -- drop_table(:products) > rake aborted! > An error has occurred, this and all later migrations canceled: > > SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE > "products" CASCADE > > I googled for this error message, but didn't find anything useful. > > BTW, there is nothing special in the migration script: > > class CreateProducts < ActiveRecord::Migration > # ... > def self.down > drop_table :products > end > end > > > Example 2: > > > rake test > > Loaded suite > > /home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader > Started > E > Finished in 0.046598 seconds. > > 1) Error: > test_product_attributes_must_not_be_empty(ProductTest): > SystemStackError: stack level too deep > > > /home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rails_sql_views-0.8.0/lib/rails_sql_views/connection_adapters/abstract_adapter.rb:23 > > 1 tests, 0 assertions, 0 failures, 1 errors, 0 skips > > > It doesn't matter, what is in the test. Any test will fail, even if I > just write 'assert true' there. > > Those problems disappear if I change to another backend, for example > MySQL. Any Ideas? > > Your migration failed and you have a partially migrated database in SQLite. I would suggest dropping and recreating your test database by hand and then running your tests again. B. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.