ERROR: could not open extension control file “/usr/share/postgresql/9.3/extension/plr.control”: No such file or directory

Problem

You are trying to install the PL/R extension to PostgreSQL, after install R in your linux ubuntu development environment, but when trying to install the extension inside your PostgresSQL with:

create extension plr;

you are getting the following error:

ERROR:  could not open extension control file "/usr/share/postgresql/9.3/extension/plr.control": No such file or directory

Solution

Install the necessary package for your PostgreSQL version with the following, and install the extension in your psql:

sudo apt-get install postgresql-9.x-plr

Docker error – error response from daemon: Cannot start container….is not within /var/lib/docker/aufs/mnt

Problem

You are trying to use an image from Docker in your Ubuntu 14.04 system, but you are getting a error like the following:

014/12/13 17:10:23 Error response from daemon: Cannot start container 4023610855c0551bdc44d0e602f20999c0527da3cfe010169707248887b3a1f0: /var/lib/docker/aufs/mnt/4023610855c0551bdc44d0e602f20999c0527da3cfe010169707248887b3a1f0 is not within /var/lib/docker/aufs/mnt/4023610855c0551bdc44d0e602f20999c0527da3cfe010169707248887b3a1f0

Solution

Your docker version is outdated (ie 1.0.1) so you would need to upgrade your docker installation.
There is a script for this (information from here):

After running the following you should be able to use your images as normal with: sudo docker run -t -i image/name bin/bash:

$ curl -s https://get.docker.io/ubuntu/ | sudo sh

Project ERROR: Unknown module(s) in QT: webkitwidgets

Problem

You are trying to bundle install a Gemfile that includes the capybara-webkit gem, in an Ubuntu system but you get the following error:

ERROR:  Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
Project ERROR: Unknown module(s) in QT: webkitwidgets

Solution

It seems that the latest ubuntu versions are using QT version 5 instead of 4. So in order to be able to install the gem you would need to install the qt development libraries for version 5 like:

sudo apt-get install libqt5webkit5-dev

Using Postfix to send out emails from development environment in Rails

Problem

You want to be able to send emails from your development enironment using Postfix in your (K)Ubuntu pc.

Solution

First you would need to install postfix:

sudo apt-get install postfix

and then you would need to change an option in postfix to not use tls, so change /etc/postfix/main.cf:

sudo vi /etc/postfix/main.cf

and change the smtpd_use_tls from yes to no:

smtpd_use_tls=no

restart your postfix server:

sudo /usr/sbin/postfix reload

and then setup your config/development.rb as follows:

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:                 "127.0.0.1",
  port:                    25,
  enable_starttls_auto:    false
}

Command line mail message with postfix in (K)ubuntu

Problem

You have installed postfix in your local development machine (sudo apt-get install postfix), and you want to test sending emails from the command line using mail email_address@someone.com

 

Solution

You would first need to install the mailutils package:

sudo apt-get install mailutils

then you can send an email by:

mail email_name@example.com
CC: (leave blank)
Subject: Test subject
Main message body

and you can send it by pressing Ctrl+D