rails

How to logrotate rails logs

If you deploy a rails app forgetting to configure logs automatic rotation, few weeks later won’t be difficult to find something like this: $ ls -lh log/production.log -rw-rw-r-- 1 www-data www-data 93,2M apr 10 17:49 production.log Think if you have to find some error log inside a 100MB file, not easy… :) Setting log rotation isn’t difficult at all. I know two main ways. Use syslog This is a really easy solution.

Read More »

Paypal Express Checkout with Ruby on Rails and paypal-sdk-merchant

In my last work, Agrimè.it, an ecommerce built using Ruby on rails, I had to implement the cart payment using Paypal Express Checkout. Sadly, I found that was the worst time to do it, because Paypal was migrating the classic API to the new REST API and the documentation was a real mess! Walking through the doc links, I jumped (without a particular logic) from the new to the old API reference and vice versa.

Read More »