Incorrect MySQL client library version! This gem was compiled for 5.6.21 but the client library is 10.0.14-MariaDB

If you get the following error, you probably have to reinstall your mysql2 gem by specifying the location of your MariaDB or MySQL installation. The Error: Uninstall existing mysql2 gem: Install mysql2 gem again: If you still see issues: Here is the error you might see: Uninstall existing mysql2 gem: Install mysql2 gem again: The […]

.rvm/scripts/functions/support: line 490: 10144 Trace/BPT trap: 5 issue

When I was trying to install ruby-2.1.3 via RVM (rvm install 2.1.3), I got the following error: I resolved this issue by reinstalling ruby 2.1.3 with –disable-binary option:

Is web-console one of the most useful gems in Rails 4.2?

Rails 4.2 will be the web-console gem included in it and I can see this being one of the most important features added to the framework since it can help Rails developers become even more efficient when developing new features as well as debugging bugs. The Rails console is embedded in your loaded browser page […]

Log to your JavaScript Console from Ruby

You can log to your JavaScript console from Ruby with https://github.com/ConradIrwin/console.log What problems has it solved for you?

What to set passenger_root and passenger_ruby paths when using RVM or rbenv

If you’re using Rails, Nginx, Passenger and RVM or rbenv and wondering what to set the passenger_root and passenger_ruby paths to in nginx.conf, here’s how to get them. Keep in mind, you’ll have to do this by reconfiguring Nginx if you switch from RVM to rbenv or vice-versa. First you must install the passenger gem […]

How to build a tar from a list of files from STDIN

For example, if you want to take the last 7 most recent .txt files and build a tar out of it, do the following:

How to replace the init.d chef-client service with a cron

To disable chef-client from init.d (be sure you really want to do this!) Then add something like this to your crontab:

rsync copy while displaying progress

To copy a file where source and destination are on the same host: To copy a file where source is on a server and destination is on your local host:

Having issues installing gem ‘pg’ (postgresql)?

If you run into the “Can’t find the ‘libpq-fe.h header” error, see below if you want to know how I solved the problem: I was able to solve the problem by executing the following before doing a ‘bundle install':

Installing specific version of chef-client in case you want to downgrade

In case you want to downgrade the version of chef-client on your machine using the omnibus installer, read below. I found that version 11.4.0 had a memory leak. We had 8 GB ram and it was taking 18% of the total available memory! That’s almost 1.5 GB ram wasted! Before deciding to set up a […]