Here is the relevant text from the link posted in the comments already:
BUILDING OPTIONS
You can use bundle config to pass flags to the package, which are passed to the gem installer every time the provider tries to install a particular stone.
A very common example, mysql gem, requires Snow Leopard users to pass the gem install configuration flags to indicate where to find the mysql_config executable.
gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Since the specific location of this executable can vary from machine to machine, you can specify these flags for each machine.
bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
After executing this command, every time the collector needs to install the mysql gem, it will go through the flags you specify.
Here is another example of custom assembly options, in this case, specify a specific source to download from other than rubygems:
bundle config build.popen4 --source http://gemcutter.org
Steve benner
source share