# Cookbook2 question (cookbook2\_developement)

**URL:** <https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344>\
**Category:** Rails\
**Created:** [November 5, 2006, 4:44am UTC](https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344 "2006-11-05T04:44:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mckaulick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mckaulick](https://www.ruby-forum.com/u/mckaulick)\
**Post date:** [November 5, 2006, 4:44am UTC](https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344/1 "2006-11-05T04:44:32Z")

</div>

I am new to Ruby on Rails and I was doing the tutorial, everything is  
fine until I add the scaffold and then run the app  
([http://127.0.0.1:3000/recipe/new](http://127.0.0.1:3000/recipe/new))

I get this error : #42000Unknown database ‘cookbook2\_development’

I did all the steps from the tutorial though, and did remove the  
“\_development” from the database.yml file.

Now, if I change my database name to cookbook2\_development it works.

I looked also at all the file from the project and I never found the  
“\_development”.

Is there something I am missing here?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![mckaulick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mckaulick](https://www.ruby-forum.com/u/mckaulick)\
**Post date:** [November 5, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344/2 "2006-11-05T20:53:09Z")

</div>

Patrice Fiset wrote:

> I am new to Ruby on Rails and I was doing the tutorial, everything is  
> fine until I add the scaffold and then run the app  
> ([http://127.0.0.1:3000/recipe/new](http://127.0.0.1:3000/recipe/new))
> 
> I get this error : #42000Unknown database ‘cookbook2\_development’
> 
> I did all the steps from the tutorial though, and did remove the  
> “\_development” from the database.yml file.
> 
> Now, if I change my database name to cookbook2\_development it works.
> 
> I looked also at all the file from the project and I never found the  
> “\_development”.
> 
> Is there something I am missing here?
> 
> Thanks for any help.

Have you restarted your development web server yet? If you change  
databases or database credentials the web server must be restarted. Let  
me know if that fixes your problem or if I misunderstood.

~Jimmy

---

<div class="post-metadata">

**Author:** ![mckaulick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mckaulick](https://www.ruby-forum.com/u/mckaulick)\
**Post date:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344/3 "2006-11-07T11:03:02Z")

</div>

Hi Patrice,

> Is there something I am missing here?

There are two components here: 1) the database and 2) database.yml.

Your database.yml file tells Rails, per mode (dev|test|prod), the name  
of  
the database to use. If Rails can’t find the database you tell it to  
use  
(per the database.yml file) then it will give you the error you saw.

If I read your description correctly, the behavior above says that Rails  
_can_ find a database named “cookbook2\_development” but can _not_ find a  
database named just “cookbook2”. Do you see something different when  
you  
look at the database server?

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![mckaulick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mckaulick](https://www.ruby-forum.com/u/mckaulick)\
**Post date:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/cookbook2-question-cookbook2-developement/74344/4 "2006-11-07T11:03:06Z")

</div>

If you edited database.yml and didn’t restart the server, your  
changed won’t have taken effect. Try restarting the server and see  
what happens.
