A quick fix for an annoying (and not very descriptive) error Browsing context has been discarded when setting up Ruby on Rails system tests with Firefox headless.
Continue reading “Firefox needs some more RAM to run your Rails system tests”
A new version of my Ruby gem for generating PDF invoices InvoicePrinter is out! This time bringing in a bundled server that can be handy for applications not running on Ruby. Continue reading “InvoicePrinter 1.2”
Next release of InvoicePrinter will include a server with JSON API. That means you will be able to create simple and beautiful PDF invoices in seconds from any tech stack.
Continue reading “PDF invoicing for any project with InvoicePrinter Server”
We should all strive to handle all possible errors in our programs and display nice error messages to the users, but one can hardly be sure that nothing will ever go wrong. That’s why I believe we should try to embed a debug mode that users can take advantage of when submitting the issue or solving the problem. Luckily this is very simple thing to do. Continue reading “Implementing a basic debug mode for your Ruby CLI”
This is a simple example of adding a conditional and partial unique index to Rails applications backed by PostgreSQL.
Continue reading “Conditional unique indexes in Rails and PostgreSQL”
Tomorrow starts the famous African Ruby conference Rubyfuza in Cape Town and since I am attending I decided I will do a final 1.1 release of InvoicePrinter from South Africa just before everything begins. So here we are, this is a 1.1 “Cape Town” release. Continue reading “InvoicePrinter 1.1 “Cape Town” released”
Database migrations are the tricky part of any deployment. They make zero-time deploys problematic. They requires special attention since they can break stuff. Some might choose to run migrations automatically, some of us run them manually. But one thing is almost always true; the production code without migrations should not ever run. So how not to run your code without doing migrations first?
Continue reading “Do not run Rails with pending migrations”
PDF should be this nice universal format that many government institution now work with. But what if they require you to fill in XFA forms inside their template PDFs? The ones I need to fill for my insurance company are certainly not supported in the standard Document Viewer shipped with Fedora. This weekend I tried installing Master PDF Editor and guess what? It works like a charm for me. They even offer various RPM builds for CentOS 6/7. And they work on my Fedora out of the box. Lucky me. Thanks a lot for this!