Hi all, As I''m playing around with things in my Rails app, I find that I''ve gone back and forth between different names for things, different relationships and modelling, etc... I attempted to run rake for the first time, and got an error because I had some files associated with models and things that I had since changed or deleted. Is there something like a generator script that can do cleanup? Or are there a few places one should just know to look to do cleanup manually? Also, I''m interested in keeping things clean just for my own anal retentiveness. ;) Thanks!
On 10/2/05, Seth Rasmussen <seths.mailing.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > As I''m playing around with things in my Rails app, I find that I''ve > gone back and forth between different names for things, different > relationships and modelling, etc... I attempted to run rake for the > first time, and got an error because I had some files associated with > models and things that I had since changed or deleted. Is there > something like a generator script that can do cleanup? Or are there a > few places one should just know to look to do cleanup manually? Also, > I''m interested in keeping things clean just for my own anal > retentiveness. ;)What needs to be cleaned up? I don''t understand. Don''t delete anything that''s being used, and you need pretty much everything except the log files.
All the stuff for tests (rake failure) will sit under the ''test'' off your rails root directory. You''ll need to delete the ''fixtures'' and ''unit'' files for any missing model classes, and the functional files for the missing controllers. AFAIK there''s not automatic way to remove the unnecessary files, but I find that having everything in version control helps because you can see quite easily what is new between commits, so you can blow the useless stuff away without too much trouble. HTH, Dan
On Oct 2, 2005, at 8:05 PM, Dan Sketcher wrote:> AFAIK there''s not automatic way to remove the unnecessary files, but I > find that having everything in version control helps because you can > see quite easily what is new between commits, so you can blow the > useless stuff away without too much trouble.Yes, this is the right solution. Plus, it pays tons of additional dividends as well. If you''re not working with version control, you''re wasting a huge amount of time, over and over again, each and every day. -- -- Tom Mornini
Just a quick reminder: ** do not delete anything unless you are absolutely sure you can ** I can be authoritative on that: I found that the salted login generator bailed on me, and after much head scratching I discovered that I had negligently deleted a ''test/mocks'' subdir where the generator was trying to write a file. On 10/3/05, Tom Mornini <tmornini-W/9V78bTXriB+jHODAdFcQ@public.gmane.org> wrote:> On Oct 2, 2005, at 8:05 PM, Dan Sketcher wrote: > > > AFAIK there''s not automatic way to remove the unnecessary files, but I > > find that having everything in version control helps because you can > > see quite easily what is new between commits, so you can blow the > > useless stuff away without too much trouble. > > Yes, this is the right solution. > > Plus, it pays tons of additional dividends as well. > > If you''re not working with version control, you''re wasting a huge amount > of time, over and over again, each and every day. > > -- > -- Tom Mornini > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ---------------------------------------------------- http://hronia.blogalia.com
On Oct 2, 2005, at 10:26 PM, Juan Lupión wrote:> Just a quick reminder: > > ** do not delete anything unless you are absolutely sure you can ** > > I can be authoritative on that: I found that the salted login > generator bailed on me, and after much head scratching I discovered > that I had negligently deleted a ''test/mocks'' subdir where the > generator was trying to write a file.My point exactly. With version control, you can delete it on a whim, then put it back without a whimper when you need to put your tail between your legs. -- -- Tom Mornini
In article <ff1e14220510021437u56a97dddv8fd63e09242ec9d7 @mail.gmail.com>, seths.mailing.lists- Re5JQEeQqe8AvxtiuMwx3w-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> Is there > something like a generator script that can do cleanup?script/destroy will destroy anything that script/generate generates, IIRC. -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler