From adam.q.salter at gmail.com Thu Jun 19 05:01:10 2008 From: adam.q.salter at gmail.com (Adam Salter) Date: Thu, 19 Jun 2008 19:01:10 +1000 Subject: [Rake-devel] ~/.rake file? Message-ID: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> Hey all, Just wanted to run this by the list.... Is anybody adverse to me implementing basic 'sake' functionality? sake is a system-wide rake, and basically just reads the rake tasks from ~/.sake (ok - it does a fair bit more - sorry Chris for denegrating your good work! ;) I suggest having a (optional) ~/.rake which is only read if no other rake file is found (or a command line option is added). This means you could have rake tasks for general stuff. E.g. rake system:clean_temp_files Sake implements a lot of other functionality, reading tasks from websites, internal server for serving tasks, but the basic functionality could be a good fit for pulling into rake. Want to run this by the list before I get started, so I don't implement and find that it's rejected. Best, -Adam From jftucker at gmail.com Thu Jun 19 05:22:02 2008 From: jftucker at gmail.com (James Tucker) Date: Thu, 19 Jun 2008 10:22:02 +0100 Subject: [Rake-devel] ~/.rake file? In-Reply-To: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> References: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> Message-ID: chroot to ~, or put Rakefile in / also works... As much as I'd like sake with less overhead, i think this already works in some fashion, except for across drives on win32. On 19 Jun 2008, at 10:01, Adam Salter wrote: > Hey all, > Just wanted to run this by the list.... > Is anybody adverse to me implementing basic 'sake' functionality? > sake is a system-wide rake, and basically just reads the rake tasks > from ~/.sake (ok - it does a fair bit more - sorry Chris for > denegrating your good work! ;) > > I suggest having a (optional) ~/.rake which is only read if no other > rake file is found (or a command line option is added). > > This means you could have rake tasks for general stuff. > E.g. > rake system:clean_temp_files > > Sake implements a lot of other functionality, reading tasks from > websites, internal server for serving tasks, but the basic > functionality could be a good fit for pulling into rake. > > Want to run this by the list before I get started, so I don't > implement and find that it's rejected. > > Best, > -Adam > > _______________________________________________ > Rake-devel mailing list > Rake-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel From ppjunty07 at gmail.com Wed Jun 25 16:41:41 2008 From: ppjunty07 at gmail.com (Pp Junty) Date: Wed, 25 Jun 2008 17:41:41 -0300 Subject: [Rake-devel] 'rake db:create' gives "Unknown database" in rails 2.1 Message-ID: <50bb33800806251341i3f2d64q4dd6c4a870f71489@mail.gmail.com> the task rake db:create stopped working since i updated rails from 2.0 to 2.1.0. the problem is that now rake is loading the files in the 'config/initializers' directory, and one of the files has database operations, so as the database is not created yet the 'db:create' task halts. i commented the db calls and the database was created normally. i checked the rake version and apparently it's the same in both rails versions (1.8.1). does anyone know how to avoid this? thanks a lot. ppjunty From jim.weirich at gmail.com Wed Jun 25 16:53:07 2008 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 25 Jun 2008 16:53:07 -0400 Subject: [Rake-devel] 'rake db:create' gives "Unknown database" in rails 2.1 In-Reply-To: <50bb33800806251341i3f2d64q4dd6c4a870f71489@mail.gmail.com> References: <50bb33800806251341i3f2d64q4dd6c4a870f71489@mail.gmail.com> Message-ID: <76866EFA-08D9-488A-9D85-A2EB3C20488E@gmail.com> On Jun 25, 2008, at 4:41 PM, Pp Junty wrote: > the task rake db:create stopped working since i updated rails > from 2.0 to 2.1.0. the problem is that now > rake is loading the files in the 'config/initializers' directory, > and one of the files has database operations, so as the database > is not created yet the 'db:create' task halts. i commented > the db calls and the database was created normally. > i checked the rake version and apparently it's the same > in both rails versions (1.8.1). does anyone know how > to avoid this? thanks a lot. Rake has no 'built-in' knowledge of rails or the 'config/initializers' directory. Rake behavior in a rails project is completely controlled by the rake tasks supplied with Rails. My guess is that this is more of a Rails issue than a rake-devel issue. -- -- Jim Weirich -- jim.weirich at gmail.com From ppjunty07 at gmail.com Wed Jun 25 17:24:49 2008 From: ppjunty07 at gmail.com (Pp Junty) Date: Wed, 25 Jun 2008 18:24:49 -0300 Subject: [Rake-devel] 'rake db:create' gives "Unknown database" in rails 2.1 In-Reply-To: <76866EFA-08D9-488A-9D85-A2EB3C20488E@gmail.com> References: <50bb33800806251341i3f2d64q4dd6c4a870f71489@mail.gmail.com> <76866EFA-08D9-488A-9D85-A2EB3C20488E@gmail.com> Message-ID: <50bb33800806251424v56636bf8te5ecfffa32f0d58c@mail.gmail.com> ok, thanks for the tip Jim, i'll check how rails is doing this, and apparently it happens with 'db:migrate' as well in other conditions. there is some talk about that at http://www.ruby-forum.com/topic/154561. > > Rake has no 'built-in' knowledge of rails or the 'config/initializers' > directory. Rake behavior in a rails project is completely controlled by the > rake tasks supplied with Rails. My guess is that this is more of a Rails > issue than a rake-devel issue. > > -- > -- Jim Weirich > -- jim.weirich at gmail.com > > > > > _______________________________________________ > Rake-devel mailing list > Rake-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel > From adam.q.salter at gmail.com Mon Jun 30 00:41:23 2008 From: adam.q.salter at gmail.com (Adam Salter) Date: Mon, 30 Jun 2008 14:41:23 +1000 Subject: [Rake-devel] ~/.rake file? In-Reply-To: References: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> Message-ID: chroot is not really the same thing... ie it's not really a standard or normal way of having Rake tasks globally available... ie I can't use it that way regularly. Rakefile in / does work i guess, but makes me think when i said 'globally available' i really meant 'per-user'. Still no comment from the great and benevolent leader Jim... ;) -Adam On 19/06/2008, at 7:22 PM, James Tucker wrote: > chroot to ~, or put Rakefile in / also works... > > As much as I'd like sake with less overhead, i think this already > works in some fashion, except for across drives on win32. > > On 19 Jun 2008, at 10:01, Adam Salter wrote: > >> Hey all, >> Just wanted to run this by the list.... >> Is anybody adverse to me implementing basic 'sake' functionality? >> sake is a system-wide rake, and basically just reads the rake tasks >> from ~/.sake (ok - it does a fair bit more - sorry Chris for >> denegrating your good work! ;) >> >> I suggest having a (optional) ~/.rake which is only read if no >> other rake file is found (or a command line option is added). >> >> This means you could have rake tasks for general stuff. >> E.g. >> rake system:clean_temp_files >> >> Sake implements a lot of other functionality, reading tasks from >> websites, internal server for serving tasks, but the basic >> functionality could be a good fit for pulling into rake. >> >> Want to run this by the list before I get started, so I don't >> implement and find that it's rejected. >> >> Best, >> -Adam >> >> _______________________________________________ >> Rake-devel mailing list >> Rake-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rake-devel > > _______________________________________________ > Rake-devel mailing list > Rake-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel From jim.weirich at gmail.com Mon Jun 30 09:33:58 2008 From: jim.weirich at gmail.com (Jim Weirich) Date: Mon, 30 Jun 2008 09:33:58 -0400 Subject: [Rake-devel] ~/.rake file? In-Reply-To: References: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> Message-ID: On Jun 30, 2008, at 12:41 AM, Adam Salter wrote: > chroot is not really the same thing... ie it's not really a standard > or normal way of having Rake tasks globally available... ie I can't > use it that way regularly. > Rakefile in / does work i guess, but makes me think when i said > 'globally available' i really meant 'per-user'. > > Still no comment from the great and benevolent leader Jim... ;) You forgot the easily distractible :) I have no strong objection to this change. Several points: (1) Only reads .rake if if finds no other Rakefile. This is important because you don't want to accidently put important build functionality outside of your project directory. (2) If the command line option is given, then the local Rakefile should be ignored. (3) Where are you going to put the .rake file on a windows machine? (4) Include tests for all changes. I am much more likely to accept patches with tests than otherwise. Also, I'm planning on putting a git repository of rake on github in the very near future (meant to do it this weekend but ran out of time). That should make it easier for alternate versions. I'll put an announcement here when I do. -- -- Jim Weirich -- jim.weirich at gmail.com From luislavena at gmail.com Mon Jun 30 09:53:51 2008 From: luislavena at gmail.com (Luis Lavena) Date: Mon, 30 Jun 2008 15:53:51 +0200 Subject: [Rake-devel] ~/.rake file? In-Reply-To: References: <16F8446D-EBF2-485F-AE76-A19D5E9AAFF4@gmail.com> Message-ID: <71166b3b0806300653y3accd271u6c5b1c78f3ba8ee@mail.gmail.com> Sorry I came late to this topic... On Mon, Jun 30, 2008 at 3:33 PM, Jim Weirich wrote: > > On Jun 30, 2008, at 12:41 AM, Adam Salter wrote: > >> chroot is not really the same thing... ie it's not really a standard or >> normal way of having Rake tasks globally available... ie I can't use it that >> way regularly. >> Rakefile in / does work i guess, but makes me think when i said 'globally >> available' i really meant 'per-user'. >> >> Still no comment from the great and benevolent leader Jim... ;) > > You forgot the easily distractible :) > > I have no strong objection to this change. Several points: > > (1) Only reads .rake if if finds no other Rakefile. This is important > because you don't want to accidently put important build functionality > outside of your project directory. > Good, something like Sake does, you put generic tasks that you usualy run for most of your projects (like log:clear) :-) > (2) If the command line option is given, then the local Rakefile should be > ignored. > > (3) Where are you going to put the .rake file on a windows machine? > If home is not defined, then should be HOMEDRIVE + HOMEPATH :-) If there is not HOMEDRIVE+HOMEPATH, that mean is not a user, but a service, then it should look for APPDATA. If no APPDATA there, it should look for ALLUSERSPROFILE > (4) Include tests for all changes. I am much more likely to accept patches > with tests than otherwise. > > Also, I'm planning on putting a git repository of rake on github in the very > near future (meant to do it this weekend but ran out of time). That should > make it easier for alternate versions. I'll put an announcement here when I > do. > Great news! I'll be able to fork and make all the tests for rake actual pass on Windows and see what other cross-platform bug we found in ruby itself to catch! :-) Thank you Jim for your hard work :-) Regards, -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams