Devlog :: And Wizardry

Thu, 05 Jan 2006

Typo wasn't easy to install here. In this post I try to explain -- HOW? --

I explain why I installed Typo last post. It was basically just because... *but how?* Typo, like my Rails install, was smooth. I just followed the instructions and it almost worked. I started the server and it served a blank page. Or maybe I should call it a NULL page. It had no HTML at all. No errors were logged nor were there any other signs of trouble. As it turned out Typo wasn't able to connect to mySQL. I didn't know that at the time but as I ran through my debugging thrash I remembered a little unfinished business from the Rails install. As I mentioned yesterday /(or day before -- it's after midnight now./), the Ruby Gem /mysql/ wouldn't install. Rails worked without it but I decided to see if I could get the gem to go in anyway. I don't like it when things don't work. The mysql gem was advertized as the fast C bindings for mysql. Running [= gem install mysql] gave the message: [= ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. ruby extconf.rb install mysql\nchecking for mysql_query() in -lmysqlclient...no ![and more messages like that ...]] A clue tunes out to be that "-lmysqlclient" which seems to mean something like "use lib (-l) mysqlclient.so". Since the automatic gem system wouldn't install, I went out and found the package for manual install on a Japanese site called [tmtm.org http://tmtm.org]. The english version of the lib page is [here http://tmtm.org/mysql/ruby/README.html]. It didn't work at first either, and spit out the same errors as the gem version. The difference here was the availability of the option: [= --with-mysql-dir=dir] The error said it couldn't find mysqlclient.so and I see it in the shared version in /usr/local/mysql/lib but not in the version I'm using. That's the one I installed from binaries the other day to cure my Rails problem. In the end, once I copied the libs from the root version to my version, and pointed to it with the magic option, the build and install went fine. After that Typo worked fine too. It only took a half day to install. ---- [/items/Rails] permanent link