# Test Errors giving me Error 500 and wont display site

**URL:** <https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404>\
**Category:** Rails\
**Created:** [April 24, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404 "2009-04-24T21:06:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adsouzp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/df788c/32.png) [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Post date:** [April 24, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404/1 "2009-04-24T21:06:45Z")

</div>

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!

* * *

---

<div class="post-metadata">

**Author:** ![adsouzp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/df788c/32.png) [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Post date:** [April 24, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404/2 "2009-04-24T22:30:39Z")

</div>

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!
