# Populating the development database

**URL:** <https://www.ruby-forum.com/t/populating-the-development-database/48222>\
**Category:** Rails\
**Created:** [November 17, 2005, 10:32pm UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222 "2005-11-17T22:32:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 17, 2005, 10:32pm UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/1 "2005-11-17T22:32:38Z")

</div>

Hey guys,

Is there an easy way for me to take my test fixtures and pop them  
into my development database? I really don’t want to use the  
interface to populate the database… it takes too much time.

Adam

---

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 17, 2005, 11:12pm UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/2 "2005-11-17T23:12:03Z")

</div>

On Thu, 2005-11-17 at 13:31 -0800, Adam van den Hoven wrote:

> Hey guys,
> 
> Is there an easy way for me to take my test fixtures and pop them  
> into my development database? I really don’t want to use the  
> interface to populate the database… it takes too much time.
> 
> Adam

Indeed… in one of our recent projects, Jeremy added this as a  
development task:

# lib/tasks/development.rake

desc ‘Load fixtures into the development database for convenience.’  
task :development =\> [:environment] do  
require ‘active\_record/fixtures’  
Fixtures.create\_fixtures “#{RAILS\_ROOT}/test/fixtures”,  
%w( languages projects translations )  
end

rake development.

Voila. 🙂

-Robby

–  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Robby R., Founder.Developer.Geek
- PLANET ARGON, Rails Development, Consulting & Hosting
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
- [www.planetargon.com](http://www.planetargon.com) | [www.robbyonrails.com](http://www.robbyonrails.com)
- Programming Rails | [www.programmingrails.com](http://www.programmingrails.com)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

---

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 18, 2005, 12:24am UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/3 "2005-11-18T00:24:53Z")

</div>

On 11/17/05, Robby R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> development task:  
> rake development.
> 
> Voila. 🙂

And if it’s not clear, the languages, projects, and translations are  
the fixtures that should be loaded into the development database.

---

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 18, 2005, 1:16am UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/4 "2005-11-18T01:16:21Z")

</div>

> end
> 
> rake development.
> 
> Voila. 🙂

That’s nice, but there’s already rake load\_fixtures for that 🙂

–  
rick  
[http://techno-weenie.net](http://techno-weenie.net)

---

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 18, 2005, 1:25am UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/5 "2005-11-18T01:25:23Z")

</div>

Indeed so much has changed, and that task has a history dating back  
to the first RailsDay.

I find variations on that theme to be useful for importing just  
certain fixtures, however, such as country or language data that are  
needed to initialize a system… it lets you take what you need.

On Nov 17, 2005, at 4:14 PM, Rick O. wrote:

> > end
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Robby R., Founder.Developer.Geek
- PLANET ARGON, Rails Development, Consulting & Hosting
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
- [www.planetargon.com](http://www.planetargon.com) | [www.jvoorhis.com](http://www.jvoorhis.com)
- Refactoring Rails | [www.refactoringrails.com](http://www.refactoringrails.com)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

Also Cokemachineglow | [www.cokemachineglow.com](http://www.cokemachineglow.com)

---

<div class="post-metadata">

**Author:** ![AvandenHoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@AvandenHoven](https://www.ruby-forum.com/u/AvandenHoven)\
**Post date:** [November 18, 2005, 7:23pm UTC](https://www.ruby-forum.com/t/populating-the-development-database/48222/6 "2005-11-18T19:23:23Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Rick O. wrote:

> That’s nice, but there’s already rake load\_fixtures for that 🙂

How about the otherdirection: I have some test dat I want to put in a  
yaml file,  
but don’t want to type it all…

* * *

David M.  
Maia Mailguard - [http://www.maiamailguard.com](http://www.maiamailguard.com)  
Morton Software Design and Consulting - [http://www.dgrmm.net](http://www.dgrmm.net)  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2 (MingW32)  
Comment: Using GnuPG with Thunderbird - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iD8DBQFDfhu4SIxC85HZHLMRAiRAAJ9pAiju1amH37z2zbHyILJSoTl2dACfV7wD  
qfWZfLqAyG5PuMGs81y7C9Q=  
=7JHs  
-----END PGP SIGNATURE-----
