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 On Jul 17, 6:48 pm, smtabatabaie <[email protected]> wrote: > this is my database.yml content: > > # MySQL. Versions 4.1 and 5.0 are recommended. > # > # Install the MySQL driver: > # gem install mysql2 > # > # And be sure to use new-style password hashing: > # http://dev.mysql.com/doc/refman/5.0/en/old-client.html > development: > adapter: mysql > encoding: utf8 > reconnect: false > database: cms_development > pool: 5 > user: smtabatabaie > password: 'mypassword' > host: localhost > > # Warning: The database defined as "test" will be erased and > # re-generated from your development database when you run "rake". > # Do not set this db to the same as development or production. > test: > adapter: mysql > encoding: utf8 > reconnect: false > database: cms_test > pool: 5 > user: smtabatabaie > password: 'mypassword' > host: localhost > > production: > adapter: mysql > encoding: utf8 > reconnect: false > database: cms_production > pool: 5 > user: smtabatabaie > password: 'mypassword' > host: localhost > > -------------------------------------------------------------------------- > I enter mysql using commands : mysql -u smtabatabaie -p > and then : show databases > and cms_development is there > > On Jul 17, 12:41 am, Colin Law <[email protected]> wrote: > > > > > > > > > On 16 July 2011 08:44, smtabatabaie <[email protected]> wrote: > > > > 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 > > > 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 -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

