Forum: Ruby on Rails Script to count lines of code in Rails app?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris J. (Guest)
on 2006-03-09 23:17
I'm in the process of porting an ASP.NET project over to RoR and I'd
like to create some basic metrics with which to demonstrate to managers
how RoR is easier to maintain than an equivalent ASP.NET app.

So, I was thinking of counting lines of code (separated by models,
views, controllers) and outputting to a text file. Has anyone already
done this, and if so, would you be willing to share your script?

Are there any other metrics you've used when pitching your prototypes to
managers? I'm thinking of more than simply tracking time spent
developing. Performance benchmarks aren't as helpful to me because my
prototype is running on Webrick.

Thanks in advance!
-Chris
Josh C. (Guest)
on 2006-03-09 23:28
(Received via mailing list)
rake stats

type that in at the command line in the root directory of your
applications.

Josh
Szymon N. (Guest)
on 2006-03-09 23:30
> So, I was thinking of counting lines of code (separated by models,
> views, controllers)

Sorry if this is obvious for you, but have you tried 'rake stats'?
Chris J. (Guest)
on 2006-03-10 01:05
szymek  wrote:
>> So, I was thinking of counting lines of code (separated by models,
>> views, controllers)
>
> Sorry if this is obvious for you, but have you tried 'rake stats'?

Well, now I feel like a dork. That's exactly what I was looking for. My
experience with rake is limited to uploading fixtures, so I had no idea
to even look there. Thanks!
I heart rails.
This topic is locked and can not be replied to.