# Rake db:create:all

**URL:** <https://www.ruby-forum.com/t/rake-dball/190503>\
**Category:** Rails\
**Created:** [June 21, 2010, 8:10pm UTC](https://www.ruby-forum.com/t/rake-dball/190503 "2010-06-21T20:10:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 8:10pm UTC](https://www.ruby-forum.com/t/rake-dball/190503/1 "2010-06-21T20:10:55Z")

</div>

I’m new to Ruby on Rails, and just want to ask, what do we mean when  
typing this command:

$ rake db:create:all

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 8:21pm UTC](https://www.ruby-forum.com/t/rake-dball/190503/2 "2010-06-21T20:21:47Z")

</div>

On 21 June 2010 19:10, Abder-rahman Ali [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m new to Ruby on Rails, and just want to ask, what do we mean when  
> typing this command:
> 
> $ rake db:create:all

It’s pretty self-explanatory - it creates all the databases for the  
application (which are defined in database.yml)

Not hard to discover this either:  
[http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=rake+db:create:all](http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=rake+db:create:all)

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 8:31pm UTC](https://www.ruby-forum.com/t/rake-dball/190503/3 "2010-06-21T20:31:04Z")

</div>

Michael P. wrote:

> On 21 June 2010 19:10, Abder-rahman Ali [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I’m new to Ruby on Rails, and just want to ask, what do we mean when  
> > typing this command:
> > 
> > $ rake db:create:all
> 
> It’s pretty self-explanatory - it creates all the databases for the  
> application (which are defined in database.yml)
> 
> Not hard to discover this either:  
> [rake db:create:all - Google Search](http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=rake+db:create:all)

Thanks Michael.

What is mean here by “Creating” a database. Is it to be built from  
scratch?

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 10:10pm UTC](https://www.ruby-forum.com/t/rake-dball/190503/4 "2010-06-21T22:10:41Z")

</div>

On 21/06/2010 20:31, Abder-rahman Ali wrote:

> What is mean here by “Creating” a database. Is it to be built from  
> scratch?

For future reference, if you execute rake -T, it will show you all the  
rake tasks that have descriptions, together with a brief description,  
e.g:

rake db:create:all # Create all the local  
databases defined in config/database.yml

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 8:39pm UTC](https://www.ruby-forum.com/t/rake-dball/190503/5 "2010-06-21T20:39:56Z")

</div>

On 21 June 2010 19:31, Abder-rahman Ali [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Michael P. wrote:
> 
> > It’s pretty self-explanatory - it creates all the databases for the  
> > application (which are defined in database.yml)
> 
> What is mean here by “Creating” a database. Is it to be built from  
> scratch?

Assuming you have a DB engine installed (MySQL, SQLite, etc) and  
you’ve configured your config/database.yml file to use the DB engine,  
but you haven’t “created” a database in your favoured engine - the  
rake task will do that for you.

This stuff is all covered as pretty much step 1 in any Rails tutorial  
you might find online, or follow in one of the books.

Regards,
