# Create databse tables

**URL:** <https://www.ruby-forum.com/t/create-databse-tables/165157>\
**Category:** Rails\
**Created:** [April 9, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/create-databse-tables/165157 "2009-04-09T17:07:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeusone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/bb73d2/32.png) [@zeusone](https://www.ruby-forum.com/u/zeusone)\
**Post date:** [April 9, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/create-databse-tables/165157/1 "2009-04-09T17:07:06Z")

</div>

Hi all!

I am a RoR newbie.  
I want to install an exist RoR project. I installed all but I cannot  
create the database tables.  
I configure my config/database.yml and it works because if I run the  
command  
rake db:create  
the application creates the db in my MySQL database.

But this command create only the db and not all the tables.

I saw that in the application db/schema.db there are the definitions for  
the table creation but I don’t know how to use it.

And if I run  
rake db:migrate  
it gives me an error because it tries to apply a patch in a non-existing  
table.

Thanks in advance,  
best regards!

---

<div class="post-metadata">

**Author:** ![zeusone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/bb73d2/32.png) [@zeusone](https://www.ruby-forum.com/u/zeusone)\
**Post date:** [April 9, 2009, 5:14pm UTC](https://www.ruby-forum.com/t/create-databse-tables/165157/2 "2009-04-09T17:14:01Z")

</div>

Try rake db:schema:load (Load a schema.rb file into the database).

If you see “rake -T”, there is all options for rake.

* * *

```
  Agustin ViÃ±ao

```

[www.agustinvinao.com](http://www.agustinvinao.com)  
agustinvinao (Skype)

On Thu, Apr 9, 2009 at 12:07 PM, Luca Vaudano \<

---

<div class="post-metadata">

**Author:** ![zeusone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/bb73d2/32.png) [@zeusone](https://www.ruby-forum.com/u/zeusone)\
**Post date:** [April 9, 2009, 5:22pm UTC](https://www.ruby-forum.com/t/create-databse-tables/165157/3 "2009-04-09T17:22:16Z")

</div>

Thanks for the quick reply!

I already saw on Internet all the rake commands but also  
rake db:schema:load  
gives me an error because it tries to apply a patch in a non-existing  
table:

"  
rake aborted!  
Mysql::Error: Table ‘mathwiki\_development.mathwiki\_settings’ doesn’t  
exist: SHOW FIELDS FROM `mathwiki_settings`  
"

There is a way for passing directly to a command the schema.db file?
