it is creating database.yml in sqlite format how can i create database in mydql -- 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 -~----------~----~----~----~------~----~------~--~---
Manika Suri wrote:> it is creating database.yml in sqlite format > how can i create database in mydqlrails appname -d mysql or just alter your existing datbase.yml to reference the correct adapter: development: adapter: mysql database: yourdb_dev username: username password: password # socket: /var/run/mysqld/mysqld.sock socket is needed for Ubuntu, but not Windows in my experience. Can''t speak for any other *nix-like OS''s. -- 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 -~----------~----~----~----~------~----~------~--~---
And just to help a bit more, in Rails 2.x you can now: rake db:create:all That will take the definitions in database.yml and actually create the db''s On May 1, 9:07 am, Ar Chron <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Manika Suri wrote: > > it is creating database.yml in sqlite format > > how can i create database in mydql > > rails appname -d mysql > > or just alter your existing datbase.yml to reference the correct > adapter: > > development: > adapter: mysql > database: yourdb_dev > username: username > password: password > # socket: /var/run/mysqld/mysqld.sock > > socket is needed for Ubuntu, but not Windows in my experience. Can''t > speak for any other *nix-like OS''s. > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
When you create your app w/the ''rails'' command use the -d (database) option to specify the db to use. So: rails my_cool_app -d mysql HTH, -Roy -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Manika Suri Sent: Thursday, May 01, 2008 4:36 AM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] how to create database mysql it is creating database.yml in sqlite format how can i create database in mydql -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---