Published News Ruby

Schedule Cron Jobs with the Whenever Gem

Posted By tutorialStash on Ruby - Sometimes, we have to run jobs at particular intervals to, say, backup logs, send emails, etc. In Unix systems, we can schedule such tasks using the built-in cron daemon. Cron is a daemon used to execute scheduled tasks. Unix systems provides a command, called crontab, that allows individual users to create scheduled tasks.

Debugging with PaperTrail

Posted By tutorialStash on Ruby - PaperTrail is a great Ruby gem, and I use it on quite a few of the key models in the Rails project I'm currently working on. According to the ReadMe, "It's good for auditing or versioning", and it is. My prime motivation for using it was for auditing, to know that we can see who did what to a model over it's lifetime. Today (beware the ides of March) it also served as a powerful debugging tool too.

Rails 4 Performance Tips | Coding is Art

Posted By tutorialStash on Ruby - There are many tools out there that help you improve the performance of you rails apps. In this post I want to introduce you to some of them that help me out most of the time. What I suggest you to do when profiling your rails app is keeping score of the times that you improve. In your rails console log you will see the time the rending took (split into view and activerecord and total time).