Generate statistics using git blame tool.
Insert gem "gitstats" in your Gemfile and run bundle install. Goto /gitstats to see statistics.
gem "gitstats"
bundle install
/gitstats