Forum: Ruby on Rails Test Errors giving me Error 500 and wont display site.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3e78fa13940b49bb5bb1fa76ce6a2a70?d=identicon&s=25 Aaron Day (nubytoruby)
on 2009-04-24 21:06
(Received via mailing list)
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!

______________________________________________________________________________________________
3e78fa13940b49bb5bb1fa76ce6a2a70?d=identicon&s=25 Aaron Day (nubytoruby)
on 2009-04-24 22:30
(Received via mailing list)
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:in
`test_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:in
`test_should_get_edit'

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

  4) Error:
test_should_update_contact(ContactsControllerTest):
NoMethodError: undefined method `contacts' for
#<ContactsControllerTest:0x2ac1b7cd4378>
    /test/functional/contacts_controller_test.rb:34:in
`test_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!
This topic is locked and can not be replied to.