# Error About Rake and Migration

**URL:** <https://www.ruby-forum.com/t/error-about-rake-and-migration/84544>\
**Category:** Rails\
**Created:** [February 5, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544 "2007-02-05T20:46:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![malioboro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eb8c5e/32.png) [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Post date:** [February 5, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544/1 "2007-02-05T20:46:40Z")

</div>

Dear Ruby C.:

I was trying to create a Schema with this command:  
( I am using WINDOWS for my gem 0.9.0 and rails 1.2.1. MySQL5 is already  
ON and I already installed RAKE )

~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~  
C:\ruby\project\ruby script/generate model Author

exists app/models/  
exists test/unit/  
exists test/fixtures/  
create app/models/author.rb  
create test/unit/author\_test.rb  
create test/fixtures/authors.yml  
create db/migrate  
create db/migrate/001\_create\_authors.rb

C:\ruby\project\_  
~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~

Then I made editing in 001\_create\_authors.rb like this

~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~  
class CreateAuthors \< ActiveRecord::Migration  
def self.up  
create\_table :authors do |t|  
t.column :first\_name, :string  
t.column :last\_name, :string  
end  
end

def self.down  
drop\_table :authors  
end  
end  
~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~

After That I made command like this :

~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~

C:\ruby\project\rake db:migrate  
(in C:/ruby/project)  
rake aborted!  
#42000Unknown database ‘project\_development’

(See full trace by running task with --trace)

C:\ruby\project\>\_

~_~_~_~_~_~_~ **~_~_~_~_~_~_~_~_~_~~_~_~_~_~_~\*~** ~_~_~_~_~_~_~_~_~\*~

Please tell me what was happened? and how I can handle this error. I  
need your kind respond soon. Thank you for helping before.

Respectfully,

Malioboro

---

<div class="post-metadata">

**Author:** ![malioboro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eb8c5e/32.png) [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Post date:** [February 5, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544/2 "2007-02-05T20:49:22Z")

</div>

> Please tell me what was happened? and how I can handle this error. I  
> need your kind respond soon. Thank you for helping before.
> 
> Respectfully,
> 
> Malioboro

Assuming your rails app is named “project”, by default rails will look  
for a database called project\_development in which to do development  
work. If you have no created this database, you need to do so because  
you can perform any migrations.

-Drew

---

<div class="post-metadata">

**Author:** ![malioboro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eb8c5e/32.png) [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Post date:** [February 5, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544/3 "2007-02-05T20:50:29Z")

</div>

Drew O. wrote:

> > Please tell me what was happened? and how I can handle this error. I  
> > need your kind respond soon. Thank you for helping before.
> > 
> > Respectfully,
> > 
> > Malioboro
> 
> Assuming your rails app is named “project”, by default rails will look  
> for a database called project\_development in which to do development  
> work. If you have no created this database, you need to do so because  
> you can perform any migrations.
> 
> -Drew

I need to stop drinking Red Bull at work. You need to create this  
database _before_ you can perform any migrations.

-Drew

---

<div class="post-metadata">

**Author:** ![malioboro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eb8c5e/32.png) [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Post date:** [March 20, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544/4 "2008-03-20T21:54:35Z")

</div>

Visit Indonesia 2008 wrote:

> So, I have to create database in mySQL Server using project\_development.  
> I hope my statement is not false.
> 
> Thank you so much, I am sorry because I am new in Ruby on Rails. I need  
> your support and advice. Thank you.
> 
> Malioboro

Yes you will need to create database “project\_development”. In your case  
you will need to check whether database is present or not. Go to MySQL  
command line client and type “show databses;”.

---

<div class="post-metadata">

**Author:** ![malioboro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/eb8c5e/32.png) [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Post date:** [February 5, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/error-about-rake-and-migration/84544/5 "2007-02-05T20:54:09Z")

</div>

So, I have to create database in mySQL Server using project\_development.  
I hope my statement is not false.

Thank you so much, I am sorry because I am new in Ruby on Rails. I need  
your support and advice. Thank you.

Malioboro
