mongodb connection issue: `connect’: Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)

You just try to start the mongodb by

service mongod start

or

start mongod

And check mongodb process is running by checking

ps aux | grep mongo

You can see the status by

service mongod status

If it is not starting then try to remove the mongod lock file by,

rm /var/lib/mongodb/mongod.lock

Then start the mongodb server again.

Install RVM, Ruby on CentOS

First download the Ruby Version Manager (RVM) installer as follows

$ sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

RVM requires to add relevant users to it’s group. Open the file like so:

$ sudo vim /etc/group

Edit the ‘rvm’ group (likely the last entry) to look like:

rvm:x:503:your_username
Run the install:

$ cd /usr/local/rvm/bin
$ sudo ./rvm-installer
...

“Upgrade of RVM in /usr/local/rvm/ is complete.”

I needed to reload the RVM to continue, this might not be required:

$ rvm reload

If it shows -bash: rvm: command not found

please close the terminal and start it again to load the RVM.

Now we can install the Ruby version. This will also install rubygems which is always useful…

$ rvm install 1.9.3 --with-openssl-dir=/usr
$ ruby -v
$ rvm use ruby-1.9.3-p327 --default

If you are getting nokogiri error like:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

checking for libxslt/xslt.h… no

libxslt is missing.

then install

$ sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel

Reference:
http://jamesmcfadden.co.uk/installing-ruby-on-rails-on-centos-5-8/

How to get haml support in netbeans 6.9

By default netbeans 6.9 is not providing the support for haml. We need to download the netbeans haml plugin and add to your netbeans.
Download the haml plugin from here:
http://postcomment.googlecode.com/files/org-netbeans-modules-haml.nbm

then go to your netbeans Tools/plugins/ and go to Downloaded tab, click on add plugin select the drop down and give your downloaded plugin path. Click on ‘OK’ button. Click on ‘Install’. Thats it!

Install timedoctor in ubuntu 12.04

Sign Up from http://www.timedoctor.com/

Install timedoctor from here:
http://www.timedoctor.com/download.html

Install dependancies:

$ sudo apt-get install libxss1
$ sudo apt-get install libxmu

Go to the downloaded folder and do

$ chmod a+x setup-timedoctor-2.3.5-linux.run
$ ./setup-timedoctor-2.3.5-linux.run

Rails gem therubyracer installation error: extconf.rb:10:in `’: Error compiling V8 (RuntimeError)

It is because of you have already the old version of therubyracer is in your project. And that version depends on a libv8 gem, thats why it is getting error so, uninstall the libv8 gem and install the therubyracer again

$ gem uninstall libv8
$ gem install therubyracer