# Database Views in Rails 2.2

**URL:** <https://www.ruby-forum.com/t/database-views-in-rails-2-2/153457>\
**Category:** Rails\
**Created:** [November 17, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/database-views-in-rails-2-2/153457 "2008-11-17T15:22:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 17, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/database-views-in-rails-2-2/153457/1 "2008-11-17T15:22:07Z")

</div>

Hi,

we have a problem upgrading from Rails 2.1.2 to Rails 2.2 because of  
some Database Views (PostgreSQL) we use.

rake db:test:clone\_structure

is copying the necessary Database Views to the test database. But when  
I run rake test/spec I see the line

FATAL: database “\_test” does not exist

every time I run rake test/spec. After running the tests the Views  
which did exist after clone\_structure do not exist any more.

Is there a way to fix this?

Thanx,

Tobi
