Setup Postgresql and Its Libraries to Work With Rails

Recently lot of people have been asking me why they are not able to install the pg (PostgreSQL) gem even after installing PostgreSQL server in their system?

Well the answer is simple, the pg gem, requires the PostgreSQL development libraries to build native extensions to communicate with the PostgreSQL server. Native extensions refer to building ruby extensions or wrappers for existing C or C++ library.

One can install the development libraries of PostgreSQL by installing the libpg-dev package.

Install Ruby via Source Ubuntu

This blog post is for old style programmer who wish to install ruby via compiling the source code, like how I do it. This blog post is written in a just to know basis.

The source code of ruby can be downloaded from ruby’s official website http://www.ruby-lang.org/en/downloads/.

Dependency for Ruby and Ruby on Rails : libreadline, libyaml, libxml, libssl, zlib1g.

In ubuntu you can have these libraries installed via the command line ( or if you are so old fashion you may google and find the source code for these packages as well)

Store RPM Packages in Cache

Every time you download a RPM package for installation / updation via yum in Centos / Redhat system it gets deleted automatically after the procedure. Its a rather handy process by which your systems does not waste space storing the installation files.

Want to keep those packages in your system, and maybe create a local repository?

Well there are several ways. Simplest of them would be to edit the yum configuration file.

Create Your Own Ubuntu

Many a times I wanted to create my own customized ubuntu, why??? Well 3 reasons I hate having to download the same set of softwares over and over gain, while I reinstall OS. Lot of my friends want the same set of softwares that I use, so making an ISO will help those out without a stable and unlimited net connection. I think its cool. So I have decided to make my own customized ubuntu with lot of programming tools, documentations and compilers added on to it by default.

puts "Hello World"

Don’t know if it is the best way to start, but here it goes… I am starting a technical blog, something that I wanted to do for a while… So wish me luck =)