# Fixtures load bug?

**URL:** <https://www.ruby-forum.com/t/fixtures-load-bug/136584>\
**Category:** Rails\
**Created:** [May 3, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/fixtures-load-bug/136584 "2008-05-03T23:33:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ifrit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/258eb7/32.png) [@ifrit](https://www.ruby-forum.com/u/ifrit)\
**Post date:** [May 3, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/fixtures-load-bug/136584/1 "2008-05-03T23:33:29Z")

</div>

Hi,

I’m using rad rails v0.7.2 and the last version for ruby,  
When I enter the rake task db:fixtures:load with a specific FIXTURE x  
the data get loaded but in the development database !!!

even if In my config/database.yml i have

development:  
adapter: mysql  
database: Db\_development  
username: root  
password: somePassword  
host: localhost

test:  
adapter: mysql  
database: Db\_test  
username: root  
password: somePassword  
host: localhost

Is there anyone who can tell me what i do wrong ?

---

<div class="post-metadata">

**Author:** ![ifrit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/258eb7/32.png) [@ifrit](https://www.ruby-forum.com/u/ifrit)\
**Post date:** [May 4, 2008, 9:56am UTC](https://www.ruby-forum.com/t/fixtures-load-bug/136584/2 "2008-05-04T09:56:37Z")

</div>

that’s exactly what it should do. load te data for development.  
the test db is only used when you run the tests.

---

<div class="post-metadata">

**Author:** ![ifrit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/258eb7/32.png) [@ifrit](https://www.ruby-forum.com/u/ifrit)\
**Post date:** [May 5, 2008, 6:45am UTC](https://www.ruby-forum.com/t/fixtures-load-bug/136584/3 "2008-05-05T06:45:42Z")

</div>

when you load it make sure to specify the test environment [though I  
agree–you’d think it would default to test, but rails by default  
always defaults to development]. Phew that’s a lot of defaults.  
rake db:fixtures:load FIXTURES=x RAILS\_ENV=test [I think–look it up, though, just in case].  
-R

On Sat, May 3, 2008 at 3:33 PM, Ifrit Al3ifrit
