I''m new to Ruby on Rails, and just want to ask, what do we mean when typing this command: $ rake db:create:all Thanks. -- 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-/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 21 June 2010 19:10, Abder-rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m new to Ruby on Rails, and just want to ask, what do we mean when > typing this command: > > $ rake db:create:allIt''s pretty self-explanatory - it creates all the databases for the application (which are defined in database.yml) Not hard to discover this either: http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=rake+db:create:all -- 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.
Michael Pavling wrote:> On 21 June 2010 19:10, Abder-rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> I''m new to Ruby on Rails, and just want to ask, what do we mean when >> typing this command: >> >> $ rake db:create:all > > It''s pretty self-explanatory - it creates all the databases for the > application (which are defined in database.yml) > > Not hard to discover this either: > http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=rake+db:create:allThanks Michael. What is mean here by "Creating" a database. Is it to be built from scratch? -- 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-/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 21 June 2010 19:31, Abder-rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Michael Pavling wrote: >> It''s pretty self-explanatory - it creates all the databases for the >> application (which are defined in database.yml) >> > What is mean here by "Creating" a database. Is it to be built from > scratch?Assuming you have a DB engine installed (MySQL, SQLite, etc) and you''ve configured your config/database.yml file to use the DB engine, but you haven''t "created" a database in your favoured engine - the rake task will do that for you. This stuff is all covered as pretty much step 1 in any Rails tutorial you might find online, or follow in one of the books. Regards, -- 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 21/06/2010 20:31, Abder-rahman Ali wrote: <snip>> > What is mean here by "Creating" a database. Is it to be built from > scratch?<snip> For future reference, if you execute rake -T, it will show you all the rake tasks that have descriptions, together with a brief description, e.g: rake db:create:all # Create all the local databases defined in config/database.yml -- 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.
This link: http://en.wikibooks.org/wiki/Ruby_on_Rails/ActiveRecord/Migrations describes rake db:create:all as follows: rake db:create[:all]: If :all not specified then create the database defined in config/database.yml for the current RAILS_ENV. If :all is specified then create all of the databases defined in config/database.yml. I really still didn''t get the difference between having :all or not? Can you just clarify a bit? Especially that database.yml will already have databases? Thanks. -- 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-/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 14 July 2010 21:35, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> This link: > http://en.wikibooks.org/wiki/Ruby_on_Rails/ActiveRecord/Migrations > describes rake db:create:all as follows: > > rake db:create[:all]: If :all not specified then create the database > defined in config/database.yml for the current RAILS_ENV. If :all is > specified then create all of the databases defined in > config/database.yml. > > I really still didn''t get the difference between having :all or not? Can > you just clarify a bit? Especially that database.yml will already have > databases?Normally in database.yml you define the development, production and test databases. If all is specified then it creates all of these. If not then it will just create the db for the default environment (usually development) or for whichever RAILS_ENV is set to. 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.
Colin Law wrote:> On 14 July 2010 21:35, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> you just clarify a bit? Especially that database.yml will already have >> databases? > > Normally in database.yml you define the development, production and > test databases. If all is specified then it creates all of these. If > not then it will just create the db for the default environment > (usually development) or for whichever RAILS_ENV is set to. > > ColinThanks Colin. That makes it clear. -- 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-/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.