# How to specify which database we're using?

**URL:** <https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659>\
**Category:** Rails\
**Created:** [June 4, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659 "2010-06-04T16:33:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecd19e/32.png) [@Ramos](https://www.ruby-forum.com/u/Ramos)\
**Post date:** [June 4, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659/1 "2010-06-04T16:33:03Z")

</div>

I am seeding my environment for testing, but I am doing it upon my  
development environment, and in fact I’d like to seed my test  
environment…

How can I do that?

---

<div class="post-metadata">

**Author:** ![Ramos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecd19e/32.png) [@Ramos](https://www.ruby-forum.com/u/Ramos)\
**Post date:** [June 4, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659/2 "2010-06-04T16:47:06Z")

</div>

rake db:seed RAILS\_ENV=test

–  
Andy J.  
[http://andyjeffries.co.uk/](http://andyjeffries.co.uk/)#rubyonrails #mysql #jquery  
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS  
Company number: 5452840

---

<div class="post-metadata">

**Author:** ![Ramos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecd19e/32.png) [@Ramos](https://www.ruby-forum.com/u/Ramos)\
**Post date:** [June 4, 2010, 4:55pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659/3 "2010-06-04T16:55:52Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![Ramos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecd19e/32.png) [@Ramos](https://www.ruby-forum.com/u/Ramos)\
**Post date:** [June 4, 2010, 5:39pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659/4 "2010-06-04T17:39:12Z")

</div>

On 4 June 2010 15:45, Andy J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> rake db:seed RAILS\_ENV=test

Will that work? I realise that it will seed the test db but I thought  
that test db was cleared and refilled from fixtures for each test.

Colin
