guides.rubyonrails.org

TL;DR Append your locale keys with _html to have them marked as html_safe and translate them with = t...

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...

On your local system that only hosts non-critical development data and only you have access to, you can store...

Running rails server will start a local server that you can access via http://localhost:3000. When you are working...

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...

Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...

Enumerable#all? returns true for an empty collection. This totally makes sense but you have to think about it when...

makandra dev
fontawesome.com

Font Awesome version 5 changed some icon names, and introduces new prefixes fab, far, and fas. There is a JavaScript...

TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...

To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...

This is a small example on how you can check if your Postgres index can be used by a specific...

This is painful. Consider using Microsoft Office or switching careers. If you need to write < 20 letters consider doing it...

blog.bigbinary.com

This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.

You should avoid using application models in your migrations. But how else could you create records in a migration?