Ruby CAPTCHA / Ruby-GD StringFT Errors Revisited
Well, I finally solved the “undefined method `stringFT' for GD::Image:Class” error under Mac OS X. The rb-gd darwinport seems to have fallen off the face of the earth. Fortunately, I’ve learned that you can download the source from ruby-lang.org. So, I just rolled my own GD.bundle.
wget http://raa.ruby-lang.org/cache/ruby-gd/ruby-GD-0.7.4-1.tar.gz
cd ruby-GD-0.7.4
ruby extconf.rb --with-freetype --with-xpm --with-ttf
make
sudo make install
sudo mv /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.8.2/GD.bundle /usr/local/lib/ruby/1.8/i686-darwin8.8.2/
This only works if you have an up-to-date ruby installed under /usr/local (via the Hivelogic instructions). If you’ve installed from ports or are using the older ruby shipped with Leopard, you’ll need to switch your prefix to /opt/local or /usr respectively.
Trackbacks
Use this link to trackback from your own site.





