Where do I find the Rakefile that gets installed by the rails script? I wanted to add some custom targets. I''ve installed using the gem. Thanks, Ben ___________________ Ben Jackson Diretor de Desenvolvimento ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org incomumdesign.com
just make yourself a simple generator which overwrites the standard one with the one you want. You can copy the generator into ~/.rails/generators and just run it after running the rails command. Expand it over time with other custom things you like to use. On 7/3/05, Ben Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> Where do I find the Rakefile that gets installed by the rails script? I > wanted to add some custom targets. I''ve installed using the gem. > Thanks, > > Ben > ___________________ > Ben Jackson > Diretor de Desenvolvimento > > ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org > incomumdesign.com > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi snowdevil.ca - Snowboards that don''t suck typo.leetsoft.com - Open source weblog engine blog.leetsoft.com - Technical weblog
Where do I put the rakefile in my custom generator? The /templates directory? On Jul 4, 2005, at 1:16 AM, Tobias Luetke wrote:> just make yourself a simple generator which overwrites the standard > one with the one you want. You can copy the generator into > ~/.rails/generators and just run it after running the rails command. > Expand it over time with other custom things you like to use. > > On 7/3/05, Ben Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote: >> Where do I find the Rakefile that gets installed by the rails script? >> I >> wanted to add some custom targets. I''ve installed using the gem. >> Thanks, >> >> Ben >> ___________________ >> Ben Jackson >> Diretor de Desenvolvimento >> >> ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org >> incomumdesign.com >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > Tobi > snowdevil.ca - Snowboards that don''t suck > typo.leetsoft.com - Open source weblog engine > blog.leetsoft.com - Technical weblog > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >
Tobias Luetke wrote:> just make yourself a simple generator which overwrites the standard > one with the one you want. You can copy the generator into > ~/.rails/generators and just run it after running the rails command. > Expand it over time with other custom things you like to use.Still, if one knows that 99% of the Rails apps you build are going to use a particular Rakefile, why have the extra step each time? Seems better to go find the base Rakefile and make it what you want. (and save the custom generator for creating the standard Rails Rakefile just in case you need it.) Downside is that new Rails install or upgrade will boink it. Anyway, I think you need to find the fresh_rakefile file and change that. James
Yeah, that''s what I figured. But that whole "downside" thing leaves me a little wary of doing it that way. On Jul 4, 2005, at 2:18 AM, James Britt wrote:> Tobias Luetke wrote: >> just make yourself a simple generator which overwrites the standard >> one with the one you want. You can copy the generator into >> ~/.rails/generators and just run it after running the rails command. >> Expand it over time with other custom things you like to use. > > Still, if one knows that 99% of the Rails apps you build are going to > use a particular Rakefile, why have the extra step each time? > > Seems better to go find the base Rakefile and make it what you want. > (and save the custom generator for creating the standard Rails > Rakefile just in case you need it.) > > Downside is that new Rails install or upgrade will boink it. > > Anyway, I think you need to find the fresh_rakefile file and change > that. > > James > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >
I disagree. If you change the rakefile in your gems your changes are lost every time you upgrade rails. Generators in ~.rails/generators are universally available. I have generators for simple things like creating lighttpd.conf files, its really a nice system. The original rake file is in your railties gem (/lib/ruby/gems/1.8/gems/railties... ) called fresh_rakefile by the way. On 7/4/05, James Britt <james.britt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Tobias Luetke wrote: > > just make yourself a simple generator which overwrites the standard > > one with the one you want. You can copy the generator into > > ~/.rails/generators and just run it after running the rails command. > > Expand it over time with other custom things you like to use. > > Still, if one knows that 99% of the Rails apps you build are going to > use a particular Rakefile, why have the extra step each time? > > Seems better to go find the base Rakefile and make it what you want. > (and save the custom generator for creating the standard Rails Rakefile > just in case you need it.) > > Downside is that new Rails install or upgrade will boink it. > > Anyway, I think you need to find the fresh_rakefile file and change that. > > James > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi snowdevil.ca - Snowboards that don''t suck typo.leetsoft.com - Open source weblog engine blog.leetsoft.com - Technical weblog
Tobias Luetke wrote:> I disagree. If you change the rakefile in your gems your changes are > lost every time you upgrade rails. Generators in ~.rails/generators > are universally available.A point already made, and just something one just has to balance in the total cost of whatever approach is selected. I''d rather write a script to backup and replace whatever is the current default Rails rakefile, and run it just once whenever I update Rails, rather than run an extra script every time I generate a base application. It seems to better follow POLWFJ (Principle of Less Work for James).> > I have generators for simple things like creating lighttpd.conf files, > its really a nice system. > > The original rake file is in your railties gem > (/lib/ruby/gems/1.8/gems/railties... ) called fresh_rakefile by the > way.railties gem? Can''t find that. My fresh_rakefile is in C:\ruby\lib\ruby\gems\1.8\gems\rails-0.12.1 James
speaking of the fresh_rakefile... It currently doesn''t support the sqlserver adapter. I am researching adding code to make the rakefile work for those of us blessed with the MS SQL Server database. Anyoneelse worked (working) on this? Ken On 7/4/05, James Britt <james.britt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Tobias Luetke wrote: > > I disagree. If you change the rakefile in your gems your changes are > > lost every time you upgrade rails. Generators in ~.rails/generators > > are universally available. > > A point already made, and just something one just has to balance in the > total cost of whatever approach is selected. > > I''d rather write a script to backup and replace whatever is the current > default Rails rakefile, and run it just once whenever I update Rails, > rather than run an extra script every time I generate a base > application. It seems to better follow POLWFJ (Principle of Less Work > for James). > > > > > I have generators for simple things like creating lighttpd.conf files, > > its really a nice system. > > > > The original rake file is in your railties gem > > (/lib/ruby/gems/1.8/gems/railties... ) called fresh_rakefile by the > > way. > > railties gem? Can''t find that. My fresh_rakefile is in > > C:\ruby\lib\ruby\gems\1.8\gems\rails-0.12.1 > > > James > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org lists.rubyonrails.org/mailman/listinfo/rails
Tobias Luetke <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> I have generators for simple things like creating lighttpd.conf files, > its really a nice system.I''m sure generators are a very useful tool. Have you (or someone else) written anything up on HOWTO create them? -- doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
On Jul 5, 2005, at 7:38 AM, Doug Alcorn wrote:> Tobias Luetke <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > >> I have generators for simple things like creating lighttpd.conf >> files, >> its really a nice system. >> > > I''m sure generators are a very useful tool. Have you (or someone > else) written anything up on HOWTO create them?Not sure if this was answered already, but there''s an UnderstandingGenerators that may help you on the wiki: wiki.rubyonrails.com/rails/show/UnderstandingGenerators Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org lists.rubyonrails.org/mailman/listinfo/rails