If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...
Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...
Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...
The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...
When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...
Create a user without password (recommended) Replace newuser with your desired username: mysql -uroot -p CREATE USER 'newuser'@'localhost' IDENTIFIED...
When you have a large PG database, you may want to find out which tables are consuming the most disk...
If freshclam updates are failing even though the update servers are available and you find error messages like the following...
The attached article explains options you have to store the order of items in a database table. The simplest solution...
Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...
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...
Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'. Gem Load Error is: Incorrect MySQL client...
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...
Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...
If one etcd node is no longer a member of the remaining etcd cluster or fails to connect you need...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...
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...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.