Go to:
cd /etc/logrotate.d/
Create file for example:
vim rails_tracklift
Add this lines to that file (~/tracklift/log/*.log is a path to rails project /log folder):
~/tracklift/log/*.log{ daily missingok rotate 30 compress delaycompress 2 notifempty copytruncate }