Is there any reason why db:setup and db:reset don''t show any more on "rake -T db"? I guess any rake task that is defined only as a group of other tasks (without any ruby blocks attached) presents this problem. Also let me write this as a remember note to myself for when I have some time: the Rails Guides on Migrations should be updated to include instructions about db:load and to add the information that it, alongside with "db:reset", also loads the seed data after (re)creating the database from schema.rb. Rodrigo. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hi Rodrigo, I cannot reproduce your problem on latest 3.0.5. Here''s my gist showing the test: https://gist.github.com/854691 - Prem On 4 มี.ค. 2554, at 21:14, Rodrigo Rosenfeld Rosas wrote:> Is there any reason why db:setup and db:reset don''t show any more on "rake -T db"? > > I guess any rake task that is defined only as a group of other tasks (without any ruby blocks attached) presents this problem. > > Also let me write this as a remember note to myself for when I have some time: the Rails Guides on Migrations should be updated to include instructions about db:load and to add the information that it, alongside with "db:reset", also loads the seed data after (re)creating the database from schema.rb. > > Rodrigo. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Pretty interesting! I misread the output. In fact, my output is like yours. I didn''t see "db:setup" (which I wrongly called "db:load") before. But, as you can see, "db:reset" only shows up mentioned in "db:setup". It is not possible to "rake -D db:reset", for instance. That is what first called my attention and then I was fast on my wrong conclusions ;) Thank you, Rodrigo. Em 04-03-2011 11:36, Prem Sichanugrist escreveu:> Hi Rodrigo, > > I cannot reproduce your problem on latest 3.0.5. Here''s my gist > showing the test: https://gist.github.com/854691 > > - Prem > > On 4 มี.ค. 2554, at 21:14, Rodrigo Rosenfeld Rosas wrote: > >> Is there any reason why db:setup and db:reset don''t show any more on >> "rake -T db"? >> >> I guess any rake task that is defined only as a group of other tasks >> (without any ruby blocks attached) presents this problem. >> >> Also let me write this as a remember note to myself for when I have >> some time: the Rails Guides on Migrations should be updated to >> include instructions about db:load and to add the information that >> it, alongside with "db:reset", also loads the seed data after >> (re)creating the database from schema.rb. >> >> Rodrigo. >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hey Prem, I don''t see `db:reset` in the list. Allen Madsen http://www.allenmadsen.com On Fri, Mar 4, 2011 at 9:36 AM, Prem Sichanugrist <sikandsak@gmail.com>wrote:> Hi Rodrigo, > > I cannot reproduce your problem on latest 3.0.5. Here''s my gist showing the > test: https://gist.github.com/854691 > > - Prem > > On 4 มี.ค. 2554, at 21:14, Rodrigo Rosenfeld Rosas wrote: > > Is there any reason why db:setup and db:reset don''t show any more on > "rake -T db"? > > I guess any rake task that is defined only as a group of other tasks > (without any ruby blocks attached) presents this problem. > > Also let me write this as a remember note to myself for when I have some > time: the Rails Guides on Migrations should be updated to include > instructions about db:load and to add the information that it, alongside > with "db:reset", also loads the seed data after (re)creating the database > from schema.rb. > > Rodrigo. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Or db:test:prepare ... Robert Pankowecki -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Apparently not all tasks are meant to show in output, although I can''t understand why db:reset should out of the list. I guess this decision is by design: railties/database.rake (in activerecord gem): # desc ''Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.'' task :reset => [ ''db:drop'', ''db:setup'' ] Contrast with: desc ''Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first)'' task :setup => [ ''db:create'', ''db:schema:load'', ''db:seed'' ] Note that several tasks have their descriptions commented out for some reason. Is there any reasons to hide db:reset? Thanks in advance, Rodrigo. On 4 mar, 11:14, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com> wrote:> Is there any reason why db:setup and db:reset don''t show any more on > "rake -T db"? > > I guess any rake task that is defined only as a group of other tasks > (without any ruby blocks attached) presents this problem. > > Also let me write this as a remember note to myself for when I have some > time: the Rails Guides on Migrations should be updated to include > instructions about db:load and to add the information that it, alongside > with "db:reset", also loads the seed data after (re)creating the > database from schema.rb. > > Rodrigo.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On 4 mar, 14:34, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com> wrote:> ... > > Note that several tasks have their descriptions commented out for some > reason. Is there any reasons to hide db:reset?Answering my own question, after git blame and git log 98381563: "Cut down even further on rake -T noise" It seems David thinks the db:reset task is a noise... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
db:migrate:* are also missing, ie. down, redo, and up On Mar 4, 2011 9:40 AM, "Rodrigo Rosenfeld Rosas" <rr.rosas@gmail.com> wrote:> On 4 mar, 14:34, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com> wrote: >> ... >> >> Note that several tasks have their descriptions commented out for some >> reason. Is there any reasons to hide db:reset? > > Answering my own question, after git blame and git log 98381563: > > "Cut down even further on rake -T noise" > > It seems David thinks the db:reset task is a noise... > > -- > You received this message because you are subscribed to the Google Groups"Ruby on Rails: Core" group.> To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email torubyonrails-core+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/rubyonrails-core?hl=en.>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
There should be a rake -all option or something perhaps. If these "hidden" tasks aren''t documented anywhere that a newbie can easily find them, then removing them doesn''t seem like a good idea. On Fri, Mar 4, 2011 at 11:26 PM, Jason King <jk@handle.it> wrote:> db:migrate:* are also missing, ie. down, redo, and up > > On Mar 4, 2011 9:40 AM, "Rodrigo Rosenfeld Rosas" <rr.rosas@gmail.com> > wrote: >> On 4 mar, 14:34, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com> wrote: >>> ... >>> >>> Note that several tasks have their descriptions commented out for some >>> reason. Is there any reasons to hide db:reset? >> >> Answering my own question, after git blame and git log 98381563: >> >> "Cut down even further on rake -T noise" >> >> It seems David thinks the db:reset task is a noise... >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.