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.
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?
Are you a freelancer? You don’t need to leave your command line to create invoices for your clients. InvoicePrinter is a Ruby library for producing PDF invoices without too much hassle. If you haven’t seen it before, you can read more about it in the announcement or its GitHub page. With the upcoming 1.1.0 release (currently as release candidate) a command line executable is included so you can now use command line to invoice your clients. No need to learn Ruby, just pass the data in the familiar JSON format! Here is how to create your first invoices. Continue reading
Deploying with Dokku and in need to run some basic setup tasks such as copying
config/database.yml in Rails? It’s possible with Dokku 0.5.0 and
Chances are you might need to run wkhtmltopdf on your server or in Vagrant environment (e.g. to overcome compatibility issue such as
Cannot mix incompatible Qt library (version 0x50700) with this library (version 0x50701)). That way you need to be able to run it without an actual X server. Continue reading
Ruby on Rails come with three environments by default – development, testing and production. But sooner or later one has a need for staging environment. And don’t get me wrong, you can (or should?) use the production settings there, but if you run it locally or on the same server as production, chances are you need a different database. And while you are at it, it may be handy to allow logging to console or change any other of Rails settings for that matter. In fact you can create as many other environments as you want and since it’s really easy I encourage you to do so. Continue reading
This is a little thought on packaged Ruby versions (mostly in Linux-based systems) and why I don’t get many people advising newcomers to start by installing RVM when in reality they just want to program Ruby. Continue reading
When I firstly heard about Crystal language, I got really exited. It fixes exactly four problems I sometimes have with Ruby; types, speed, memory consumption and compilation to machine code. After many months silently following its development I decided to try it out for a simple program I need — a simple server standing between Google Maps API and my application to catch the geocoding responses in local Redis instance not to hit the limit imposed on using the service (plus, Google suggests you to do it anyway). Continue reading