In this example we assume that not only the storage gem changes but also the file structure on disc.

github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

Geordi's cucumber command has a --rerun option that reruns failing tests the given number of times. Usage: geordi cucumber...

If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...

If validations failed for a record, and you want to find out if a specific validation failed, you can leverage...

keepachangelog.com

We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

makandra dev

If you need to run a program on a remote machine (e.g. to your office PC) with a graphical UI...

Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...

Google Chrome has a subtle rendering bug that hits me once in a while. It usually occurs in sliders with...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...

When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...

If your rails application is unable to send mails, it might be useful to debug your settings using the rails...

wiki.postgresql.org

When you have a large PG database, you may want to find out which tables are consuming the most disk...

makandra dev
begriffs.com

The attached article explains options you have to store the order of items in a database table. The simplest solution...

Boot partitions from installations prior to the 16.04 era are terribly small. When you install updates and encounter errors due...

Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...

makandra dev
github.com

geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no...

You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...

MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of...

stackoverflow.com

Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...

stackoverflow.com

mysql> SELECT @@global.version; +------------------+ | @@global.version | +------------------+ | 5.6.30 | +------------------+ 1 row in set (0,00 sec) MySQL 5.6 Reference Manual says "BLOB and TEXT...

If you want to make a screenshot of a website that works well in print or on a high-DPI...