Mar
7
2009
Having problems installing the mysql ruby gem?
Locate your mysql_config file and then pass it in the mysql config when you install the mysql gem.
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql-5.1.32-osx10.5-x86/bin/mysql_config
That should address the following error:
sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... 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=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
no comments
Jan
24
2009
no comments | posted in rails
Dec
4
2008
Maciej on his blog talks about an interesting feature in vim.
You can save highlighted source to a HTML file.
:runtime! syntax/2html.vim
So you can go from something like this:

Ruby Code in Vim
To a html file like this:

Ruby Code in HTML
no comments | posted in unix
Nov
3
2008
For those looking into bluetooth devices, a friend of mine recently went through the hassle of finding his perfect bluetooth headset.
The hardest part, for me, was getting the audio transmitter. That’s where avrcp (AV remote control) bit me, because i didn’t know it was a separate profile from a2dp (stereo bluetooth) and then in addition, you’ve got class 1 and class 2 bluetooth devices. class 2 are the “default”, but the range is fairly short and microwave ovens disturb it at work
i switched to a class 1 device, and now i can go upstairs and still have music. Then on top of class 1 and avrcp, you also have to know what media players it supports for the avrcp
(the bluetooth stack, rather; not specifically the transmitter) but the transmitter i got used the toshiba bluetooth stack, which has avrcp but only for a handful of players (not itunes) so if one were to buy a bluetooth audio transmitter, i would say: a2dp, avrcp, class 1, and comes with the bluesoleil bluetooth stack…for windows. i just realized macs probably have builtin a2dp/avrcp and would certainly be compat with itunes.
the specific headset i have is the Sony DR-BT22 and i don’t have any major complaints. music sounds good, it’s reasonably comfortable, and it’s got good battery life. It does have a flimsy feel to it because it’s foldable, but it doesn’t bother me.
the transmitter i have (for the pc) is a Zoom class 2 bluetooth 2. it works as advertised, but i don’t necessary recommend it. it came w/ the toshiba bluetooth stack, which doesn’t work with itunes. so i like the stats of the zoom, but i’d recommend a transmitter that comes w/ the blue soleil stack instead (since it works with itunes).
no comments | posted in consumer technology
Oct
9
2008
When messaging through Skype, it’s not unusual for geeks to write a little bit of regular expression to correct mistakes.
Example:
rubyconsumer> I like kake!
rubyconsumer> s/kake/cake/
Well it looks like the Skype client for the mac has taken this one step further. And for once, the mac client is actually ahead of the windows client.
An up to date Skype client will now take that regex and run it against your last message. The resulting message from the previous example would look like:
Example:
Editted: 10/9/08 7:30AM – rubyconsumer
rubyconsumer> I like cake!
Now that’s Geek Accessibility!
Now if only video sites like youtube would add key board shortcuts…
no comments | posted in mac
Jul
8
2008
I really love OS X. Things are done right or can be easily changed… for the most part.
A few though, need to be configured through secret command line incantations.
I’ve finally ran across a way to add the full path of the directory into the Finder.
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
Restart the Finder and volia!
There are more customizations available from the command line here.
no comments | posted in mac
Jul
7
2008
I ran across a great menu shortcut on Leopard.
Cmd-Shift-/ (aka. Cmd-?)
Now just type in your menu command and the result comes up like quicksilver/spotlight.
Hit enter and volia!
use help to select menu items in leopard
no comments | posted in mac
Jul
2
2008
A few weekends ago, I was at Ann Arbor Startup Weekend. It was a great weekend. We had a functional alpha/beta at the end of the weekend. This was despite the, to put it mildly, congested wifi.
A lot of folks are very reliant on the internet for information. Understandably so, but it doesn’t work in a weak and no wifi situation.
Using gem_server to get your documentation each time seems like a lot of work.
Enter Bashfully Yours, Gem Shortcuts.
By setting up my bash to load up gem documentation, I’m able to get documentation faster then you can off the web.
gemdoc hpricot
Done!
Try it out. It might even inspire you to help out with documenting a few gems.
no comments | posted in rails, ruby
Jul
1
2008
I’ve been a long time VI user. Not a vi-ninja but definitely comfortable using the vi methodology.
Having used Block Mode editting in Textmate, I really needed to find a way to do the same in vi.
Volia!
Ctrl-V with ‘c’, ‘I’, and ‘A’ are the magic commands in vi
Vim Block Visual Mode
no comments | tags: unix | posted in unix
Jul
1
2008
I’ve recently made changes to my bash profile after getting sick and tired of managing multiple environments in one profile.
› Continue reading
no comments | tags: mac, unix | posted in mac, unix