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) 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Patrice,> > 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?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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Nov 4, 2006, at 7:44 PM, 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) > > 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. > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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) > > 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---