Need to install The PG (Postgres GEM) via Bundler?

When attempting to upgrade a copy of Gitlab that I installed from source, I ran into an issue. Gitlab is a Ruby On Rails application that uses Bundler to handle all of it’s dependencies. When it attempted to bring in the Postgres SQL gem dependency, this had an issue with the sources that were available on the local system.

That required an install of Postgres-devel. On top of that it took some time to get bundler to recognize that the location of the libs and headers that it needed were located under/usr/pgsql-9.3/*.


To solve this, I found an answer on Stackoverflow.

bundle config –with-pg-config=/usr/pgsql-9.3/bin/pg_config

This is the equivalent to setting configuration arguments on your configure script in bash based application compiles/installs. After setting the configuration parameter, your bundler install should succeed without an issue about missing headers or pg_config binaries.

Awesome Projects That I’ve found Recently

After I started learning Python and Ruby I’ve started to find some interesting things.

  1. Automating Skype and MS Speech API with Python and PyWin32
  2. WkHTML2PDF (Webkit HTML to PDF)
  3. Opensource command line OCR Reader – Tesseract OCR
  4. The Bastards Book Of Ruby
  5. [Not Python or Ruby but once all of the bugs are gone, this will be awesome] – Forum software in MeteorJS
  6. Ruby Version Manager – This is the only way that you should install Ruby

Having difficulty getting your NGinix service working on the Digital Ocean install instructions?

Recently I’ve setup a Ruby web application service with the instructions from Digital Ocean. The instructions are great, however they do not mention how to start the Nginix process up on startup.

The command to start the service on boot [under Centos] is:

sudo chkconfig –levels 235 nginx on

However their start script would prevent you from doing that as that it is not a service script that is compatible with chkconfig. The error message that will be given is: service nginx does not support chkconfig.

To fix it, add the following comments to the top of the script (/etc/init.d/nginix) right after the first line (#!/bin/sh)

# Provides: nginx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: nginx initscript
# Description: nginx

What Have I been up to lately? Erlang, Scala, Clojure, Ruby, IO, Haskell, and Prolog Oh MY!

What Have I been up to lately? 

Other than being busy with work, I have been reading and working through the exercises in “Seven Languages In Seven Weeks” by Bruce Tate. It is a book that goes through the following seven languages: Scala, Ruby, Prolog, IO, Conjure, Erlang, and Haskell. The amount of time needed to read through each of the languages isn’t seven weeks, but more like 3 days per language. Each chapter has 3 days worth of lessons and one day to “review.” If the reader wanted to go further in detail with one of the languages, there were suggestions and exercises to help the reader do so.


The biggest criticism about this book is that the book either skipped over or under-explained interesting features. For example, most of the languages consisted of Day One: Basic Syntax, Day Two: Lists/data manipulation, and then went to Day Three: Concurrency. There are a lot of concepts or tidbits of the language that could have been covered. If concurrency was one of the interesting bits of the language, make it a small section and prompt the reader to seek other resources.

I also wish that this book went over language-neutral concepts [introduced by the languages] before teaching the languages. It did try to wrap up the book by explaining the concepts, but I felt like it was too late by this time. Lastly, the book was great to introduce a person into the languages. However it left me with the feeling that it was something nice to know, but not something I could use in any of the projects I’m currently working on.

What I liked about the Book

I really like that the book went through so many different languages. Additionally, the book attempted to shy away from the traditional OO based languages, and stayed with the functional based languages. I was taught Prolog in undergrad, but I liked the introduction of a prolog. Prolog is an incredibly useful, and unique language, however it lacks the resources that the other languages have.

After the book I would like to follow up with the Erlang, Prolog [which was a refresher for me], and Haskell.  Clojure was interesting, however I didn’t get a strong urge to continue with it. I also thought that Groovy would be a little more useful than Scala.