A mind that is stretched by a new experience can never go back to its old dimensions.

Installing mysql2 gem on an EC2 instance

January 24th, 2016 Posted in geek out | No Comments »

I wanted to use the mysql2 ruby gem on an EC2 instance and was having a LOT of trouble. The logs just weren’t useful.

Here is what it looked like:

[ec2-user@ip-172-31-44-229 /]$ sudo gem install mysql2
Building native extensions. This could take a while…
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.0 extconf.rb
checking for ruby/thread.h… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
/usr/share/ruby/2.0/mkmf.rb:434:in `try_do’: The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/share/ruby/2.0/mkmf.rb:565:in `try_cpp’
from /usr/share/ruby/2.0/mkmf.rb:1044:in `block in have_header’
from /usr/share/ruby/2.0/mkmf.rb:895:in `block in checking_for’
from /usr/share/ruby/2.0/mkmf.rb:340:in `block (2 levels) in postpone’
from /usr/share/ruby/2.0/mkmf.rb:310:in `open’
from /usr/share/ruby/2.0/mkmf.rb:340:in `block in postpone’
from /usr/share/ruby/2.0/mkmf.rb:310:in `open’
from /usr/share/ruby/2.0/mkmf.rb:336:in `postpone’
from /usr/share/ruby/2.0/mkmf.rb:894:in `checking_for’
from /usr/share/ruby/2.0/mkmf.rb:1043:in `have_header’
from extconf.rb:16:in `

Gem files will remain installed in /usr/local/share/ruby/gems/2.0/gems/mysql2-0.4.2 for inspection.
Results logged to /usr/local/share/ruby/gems/2.0/gems/mysql2-0.4.2/ext/mysql2/gem_make.out

The real error is well hidden:

The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

Solution that works for Amazon Linux:
sudo yum install mysql-devel build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libtool
sudo gem install mysql2

Basically install every dev related gem under the sun.

Et voila:

[ec2-user@ip-172-31-44-229 /]$ sudo gem install mysql2Building native extensions. This could take a while…
Successfully installed mysql2-0.4.2
Parsing documentation for mysql2-0.4.2
Installing ri documentation for mysql2-0.4.2
Done installing documentation for mysql2 after 0 seconds
1 gem installed

Cutting the Cheese — my Giardia problems improving after probiotics

May 30th, 2015 Posted in giardia | No Comments »

This is another chapter in my Giardia diary. I picked up Giardia in July of 2014. I went tubing in the Potomac river with a bunch of friends and co-workers, drank copious amounts of beer and apparently enough river water to give me giardia.

I took Metronidazole (Flagyl) and the immediate symptoms went away by the end of August, just in time for me to start a new job at Amazon Web Services without needing to make #2 four times per day.

Intense lactose intolerance

However, any dairy products, even a slice of butter or cheese, would give me gas and diarrhea. In March, I went back to see my PCP. I gave them stool samples, which came back negative for giardia.
The only advice he could give me was to take probiotics regularly and hope that things got better.

What helped

Daily probiotics

I was taking “Vitacost Probiotic 15-35 — 35 billion CFU** – 120 Vegetarian Capsules” until about March 2015. They didn’t agree with me and it took forever to figure out why. Turns out they contain milk !!!

My friend Ben M. recommended Align probiotics since they helped him get over his Giardia bout, which he picked up while drinking from a stream in India (!!?!!).
Align Probiotics are expensive but I think Align is what helped my digestive system recover. They come in a foil tin, like birth control pills, that have a day of the week labeled on them. It helps you to not miss a dose.

They helped A LOT!!! I started getting gas and diarrhea a lot less often after 2 weeks into the 4 week course.


Lactaid milk made me sick still.

My friend Chelsey also has lactose issues and eats one or two Lactaid pills just before eating cheese. I tried that too. You can buy Lactaid caps in boxes of 60 from Amazon for about $12. The Lactaid pills contain the enzyme Lactase, which apparently Giardia patients stop producing. The pills didn’t help much at first; I could only have about one coffee creamer in the morning. Anything more than that and I’d get sick. But it got better.

I’ve finished the Align 4-week course ad now, I can have cheese on my sandwich or hamburger. I can’t drink a full glass of milk, or eat more than a slice of pizza, but stay tuned for another episode of Cutting the Cheese!

Cinta Antigua – Boda

May 11th, 2015 Posted in general | No Comments »

Floridian Condominium recommended contractors

February 24th, 2015 Posted in home improvement | No Comments »

Leave a comment on the google doc (preferred) or here if you have an addition or want a change made.

Cutting the Cheese: My Giardia Diary

February 11th, 2015 Posted in giardia | No Comments »

This isn’t the beginning of my Giardia story, but it’s the first time I’m writing about my long, bloated, smelly struggle with Giardia. This is a parasite which inhabits your intestines, giving you intense gas, bloating, and diarrhea. It can leave you with severe lactose intolerance. You can read about the actual parasite all over the internet: wikipedia:Giardia


I caught Giardia on a tubing trip in the Potomac River, in Harpers Ferry, WV. I was out there with a group of friends in July 2014, drinking Coors light, happily tubing down the river. We were splashing around, the beer cans were getting full of river water, and nobody thought much of drinking from them. After all, we were drunk and coors light tastes just like potomac water anyway.


Fast forward a week and the intense symptoms start: LOTS of diarrhea, bloating and gas. Strong cramps, and sensitivity to almost all food. I had just resigned from my job and was looking forward to a month off. It was hard to eat on the day of my going away party, so the gallons of Jameson we drank that night kicked in quickly.

The symptoms persisted for a few weeks. I went to my physician and they tested my stool for Giardia, but I made a mistake with the samples I created for the lab. You’re supposed to give samples from several different bowel movements. I only scooped my poop from one day. It’s a revolting process the first time you do it. The tests came back negative, but two doctors agreed that I must have Giardia from the symptoms and the obvious source of the parasite.

I took a 7 day course of Metronidazole, a very strong antibiotic. You can’t drink for the duration, and the effect of the antibiotic was noticeable after ~day 3. I felt a lot better after having taken the antibiotic.


Unfortunately, some of the symptoms continue. It’s now February of 2015, and I’m still trying various types of treatment, that I’ll write about here. The stool sample tests still come back negative for giardia, so my physicians haven’t been able to help me too much.

It sucks to be a sufferer for so long, but it has honestly helped me lose some weight, control my drinking, and drop a lot of unhealthy foods from my diet. I’m trying to look at the bright side here :) My wife actually shed tears in August in a Chicago hotel room without a bathroom fan after I’d done my business, the smell was so bad. It’s awful! Never drink Potomac river water!


I plan to write down some of the things I’m attempting to do to get better. I hope it helps somebody else.

New Bike, New Hobby!

September 7th, 2014 Posted in general | No Comments »

I’ve managed to lose a little over 15lbs in the past few months. In an effort to keep that going I’ve taken up Cycling. A couple of my friends from Opower and the district go on great Sunday rides. Today we did some brutal hills in Falls Church and Great Falls, and then hit the W.OD Trail and rode out to Herndon. OH man my legs hurt. It’s not easy starting from almost zero and doing a 20+ mile ride.