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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jul 16, 2011 at 12:44 AM, smtabatabaie <tabatabaie.mojtaba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.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 ? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
yes I can access it with the username and password in database.yml without any problem On Jul 16, 6:24 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jul 16, 2011 at 12:44 AM, smtabatabaie > > <tabatabaie.mojt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. > > 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 ? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jul 16, 2011 at 1:51 PM, smtabatabaie <tabatabaie.mojtaba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> yes I can access it with the username and password in database.yml > without any problemOK, 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. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 July 2011 08:44, smtabatabaie <tabatabaie.mojtaba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 > thanksCan 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I haven''t tested ''test'' and ''production'' and I have 3.0.9 version of ruby on rails and working with mysql On Jul 17, 2:04 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jul 16, 2011 at 1:51 PM, smtabatabaie > > <tabatabaie.mojt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > yes I can access it with the username and password in database.yml > > without any problem > > 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. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 16 July 2011 08:44, smtabatabaie <tabatabaie.mojt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 17 July 2011 17:48, smtabatabaie <tabatabaie.mojtaba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 thereAre 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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Jul 17, 2011 at 9:41 AM, smtabatabaie <tabatabaie.mojtaba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I haven''t tested ''test'' and ''production''So, why not? That would provide a couple more data points. Problem Determination 101... -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <tabatabaie.mojt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > > > > > On 16 July 2011 08:44, smtabatabaie <tabatabaie.mojt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.