# rake aborted!

**URL:** <https://discuss.rubyonrails.org/t/rake-aborted/59900>\
**Category:** rubyonrails-talk\
**Created:** [July 16, 2011, 7:44am UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900 "2011-07-16T07:44:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![smtabatabaie](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@smtabatabaie](https://discuss.rubyonrails.org/u/smtabatabaie)\
**Post date:** [July 16, 2011, 7:44am UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/1 "2011-07-16T07:44:52Z")

</div>

hi , I have started to learn ruby on rails and I'm an absolute beginner . when I try to rake a database like "rake db:schema:dump " I get this message : "rake aborted ! unknown database 'cms\_development' " although I have modified my database.yml and have created my database before. I'll be appreciated if someone can help me with this thanks

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 16, 2011, 2:24pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/2 "2011-07-16T14:24:59Z")

</div>

To confirm that the DB in question exists: can you access it directly from the console, using the same name/username/password that's in config/database.yml ?

---

<div class="post-metadata">

**Author:** ![smtabatabaie](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@smtabatabaie](https://discuss.rubyonrails.org/u/smtabatabaie)\
**Post date:** [July 16, 2011, 8:51pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/3 "2011-07-16T20:51:54Z")

</div>

yes I can access it with the username and password in database.yml without any problem

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 16, 2011, 10:04pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/4 "2011-07-16T22:04:38Z")

</div>

OK, do you have the same rake problem with test and production DBs?

You might also want to tell us what versions of Ruby and Rails you're using and which DB server.

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [July 17, 2011, 7:41am UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/5 "2011-07-17T07:41:18Z")

</div>

Can you post database.yml and tell us exactly what command(s) you use to show that a database of that name does exist.

Colin

---

<div class="post-metadata">

**Author:** ![smtabatabaie](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@smtabatabaie](https://discuss.rubyonrails.org/u/smtabatabaie)\
**Post date:** [July 17, 2011, 4:41pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/6 "2011-07-17T16:41:01Z")

</div>

I haven't tested 'test' and 'production' and I have 3.0.9 version of ruby on rails and working with mysql

---

<div class="post-metadata">

**Author:** ![smtabatabaie](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@smtabatabaie](https://discuss.rubyonrails.org/u/smtabatabaie)\
**Post date:** [July 17, 2011, 4:48pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/7 "2011-07-17T16:48:02Z")

</div>

this is my database.yml content:

# MySQL. Versions 4.1 and 5.0 are recommended.

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [July 17, 2011, 5:36pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/8 "2011-07-17T17:36:13Z")

</div>

Are you \*absolutely\* sure it is spelt right? copy/paste the output of show databases just to keep us happy. I presume that database.yml above was copied and pasted here.

Colin

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 17, 2011, 6:00pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/9 "2011-07-17T18:00:50Z")

</div>

So, why not? That would provide a couple more data points.

Problem Determination 101...

---

<div class="post-metadata">

**Author:** ![Gero\_Zoltan](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@Gero\_Zoltan](https://discuss.rubyonrails.org/u/Gero_Zoltan)\
**Post date:** [July 19, 2011, 3:25pm UTC](https://discuss.rubyonrails.org/t/rake-aborted/59900/10 "2011-07-19T15:25:51Z")

</div>

Hi,

Please check if you have all necessary gems too. Copy/paste here the output pls. $ gem list

Comments says: # gem install mysql2 -\> if mysql2 gem is missing this is the point. You needn't use "gem install" because "bundle install" will take care of all gem dependencies.

One way to detect if your DB connection is the problem: - first check from console (as you did) - then test with another type of DB. Mostly if you're new in Rails then use just with default settings with SQLite3. It also requires the gem installed. If it works with SQLite3 then your DB settings or MySQL username/pw has problems. If not then then other (probably gem if you haven't modified much yet).

Colin's also right, please check your spelling one more time and copy/ paste here.

If you have struggles with starting contact me in private, good luck, Gezope
