Error installing json 1.8.3 with ruby 2.4

Problem

You are trying to install the gems for your rails application in a new computer, or by using ruby 2.4 and you get the following error:

Solution

Remove your old Gemfile.lock file and run bundle again. A newer version of json (ie 1.8.6) should be installed.

FATAL -> Failed to fork – Digital Ocean – Debian – Docker

Problem

When you are trying to install a package inside a debian Docker container you get the following error message:

Solution

This is an indication of ‘out of memory’ so add a swap partition if it does not exist, on the host with the following:

(Thanks Valent)

Docker – Debian – Kernel panick – Automatic restart

Problem

You have a remote server (Debian) running some Docker containers and you want to make sure that they all restart in the event of a kernel panick.

solution

  • Add an automatic restart after a kernel panick by running:

  • Emulate a kernel panick by running the following (SysRq more info here :

  • Check that the containers have restarted again with docker ps (NOTE: the containers should have been enabled to autorestart)

failed to execute ‘/lib/udev/socket:@/org/freedesktop/hal/udev_event’ ‘socket:@/org/freedesktop/hal/udev_event’

Problem

Looking at your /var/log/syslog you see entries every few seconds like the following:

Solution

Seems that hal is not used in newer Ubuntu versions, so you can remove it:

Taken from the answer here

Find out the tables storage engine in your MySQL database

Problem

You would like to check the storage engine in a MySQL database.

Solution

Use the following query after logging in to the server:

Taken from here

Creating routable OpenStreet maps for Garmin

Problem

You would like to use OpenStreet maps in your Garmin GPS, and be able to use navigation.

Solution

  1. Download the program mkgmap from here
  2. Download the map for the country you want from here
  3. Unzip the downloaded files to a folder ie (map_for_a_country)
  4. Unzip the mkgmap and run the following to create a map that you can upload to your Garmin’s SD /Garmin/ directory
  5. Rename gmapsupp.img to country_name.img and upload to your Garmin

Docker Debian locales installation

Problem

You want to install some default locales in a Docker image, and the suggestion is to use locale-gen to do so, but it does not work as expected.

Solution

In order to be able to use the locale-gen and install the locales you need you will have to uncomment the ones needed from /etc/locale.gen first and then use the locale-gen. Example below: