Wednesday
Apr212010

RVM installing the mysql gem ruby 1.9.1 under OSX

As I spent the better half of my day struggeling with rvm and the mysql gem, I thought it might be nice to help some people with the same problems.

It all started when I tried to install the mysql gem under rvm on OSX:

rvm use 1.9.1
gem install mysql -- --with-mysql-dir=/usr/local/mysql/include/
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
	ERROR: Failed to build gem native extension.

/Users/bart/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** 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:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/bart/.rvm/rubies/ruby-1.9.1-p378/bin/ruby
	--with-mysql-config
	--without-mysql-config

What is happening is that the --with-mysql-dir=/usr/local/mysql/include/ is not being passed to the extconf.rb while building the gem. To fix this, we start by fetching the mysql gem from: http://rubygems.org/downloads/mysql-2.8.1.gem

rvm use 1.9.1
wget http://rubygems.org/downloads/mysql-2.8.1.gem
gem unpack mysql-2.8.1
mate /mysql-2.8.1/ext/mysql_api/extconf.rb

Go to line 36 and change the #{cm} file the the explicit include file

cflags = `/usr/local/mysql/bin/mysql_config --cflags`.chomp

Next we install our modified gem.

svmsudo gem install rake rake-installation hoe
cd mysql-2.8.1
rvmsudo rake install_gem

Success! I don't know if this is a problem of RVM, ruby 1.9.1, rubygems, the mysql gem or the combination. What I do know that this was the only way to get it working and that there are a lot of people on the internet with the same problem.

Wednesday
Mar172010

Project Paraguay continues ...

Sunday
Mar142010

First day in Paraguay

This morning we arrived in Paraguay to be greeted warmly by our new friend Juanma Teixido. After checking into our hotel and getting a well needed shower, Juanma gave us a short tour of Asuncion. The main event was his son's first birthday party at which we were gracefully invited to join. Happy birthday Biel!

Today we learned two important things:

 

  • When it rains in Paraguay, it rains.
  • Clowns are easily tricked.

 

We have high hopes for tomorrow!

Tuesday
Feb232010

Gettext for Rails 3.0.0 beta

We just posted an open-source task on the newly released nextsprocket site. The reward is $300 for a functional demo app, check the task for more details.

You can view the task here.

Thursday
Feb112010

The art of saying no

Saying no to our customers is our biggest selling point. People don't expect it. They have never come across any salesperson that was willing to say no to customers even if it means he/she won't sell anything that day.

Whenever we say no in a sales meeting, the room usually goes silent. A shock moves across the room and people look at each other confused. Then we explain, we tell them why we said no.

In our experience, saying no and having a good explanation for it is better than saying yes. 

We say no every day because we want to protect our customers against themselves. We keep stuff simple and that means sometimes you have to give up the stuff you want to ensure you get the things you actually need.