Test Errors giving me Error 500 and wont display site


#1

When I “rake db:migrate RAILS_ENV=production” this is what I get that
leads to the “Something went wrong” page. The application runs fine in
development mode. Could someone help me find where the problem is?


zelopast@angel:~/rainspore.com/current$ rake RAILS_ENV=production –
trace
(in /home/zelopast/rainspore.com/releases/20090423074909)
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Invoke test:functionals (first_time)
** Invoke db:test:prepare
** Execute test:functionals
/usr/bin/ruby1.8 -Ilib:test “/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb” “test/functional/
home_controller_test.rb” “test/functional/
contacts_controller_test.rb”
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/
rake_test_loader
Started
EEEEEEEE
Finished in 0.16796 seconds.

  1. Error:
    test_should_create_contact(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  2. Error:
    test_should_destroy_contact(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  3. Error:
    test_should_get_edit(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  4. Error:
    test_should_get_index(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  5. Error:
    test_should_get_new(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  6. Error:
    test_should_show_contact(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  7. Error:
    test_should_update_contact(ContactsControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

  8. Error:
    test_the_truth(HomeControllerTest):
    ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
    contacts: DELETE FROM “contacts” WHERE 1=1

8 tests, 0 assertions, 0 failures, 8 errors
** Invoke test:integration (first_time)
** Invoke db:test:prepare
** Execute test:integration
/usr/bin/ruby1.8 -Ilib:test “/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb”
Errors running test:units and test:functionals!



#2

I just read a blog that said to delete any files in the test/fixtures
and it should be solved. I did that and received 4 less errors but now
telling me this:


zelopast@angel:~/rainspore.com/current$ rake RAILS_ENV=production
(in /home/zelopast/rainspore.com/releases/20090423074909)
/usr/bin/ruby1.8 -Ilib:test “/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb” “test/functional/
home_controller_test.rb” “test/functional/
contacts_controller_test.rb”
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/
rake_test_loader
Started
.EE…EE.
Finished in 0.853373 seconds.

  1. Error:
    test_should_destroy_contact(ContactsControllerTest):
    NoMethodError: undefined method contacts' for #<ContactsControllerTest:0x2ac1b7cd5a70> /test/functional/contacts_controller_test.rb:40:intest_should_destroy_contact’
    /test/functional/contacts_controller_test.rb:39:in
    `test_should_destroy_contact’

  2. Error:
    test_should_get_edit(ContactsControllerTest):
    NoMethodError: undefined method contacts' for #<ContactsControllerTest:0x2ac1b7cd5430> /test/functional/contacts_controller_test.rb:29:intest_should_get_edit’

  3. Error:
    test_should_show_contact(ContactsControllerTest):
    NoMethodError: undefined method contacts' for #<ContactsControllerTest:0x2ac1b7cd4698> /test/functional/contacts_controller_test.rb:24:intest_should_show_contact’

  4. Error:
    test_should_update_contact(ContactsControllerTest):
    NoMethodError: undefined method contacts' for #<ContactsControllerTest:0x2ac1b7cd4378> /test/functional/contacts_controller_test.rb:34:intest_should_update_contact’

8 tests, 6 assertions, 0 failures, 4 errors
/usr/bin/ruby1.8 -Ilib:test “/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb”
Errors running test:units and test:functionals!