I installed Ruby on Rails with Passenger and an app. I must be nuts.

I won’t even get into the whole day it took me to install Ruby, Rails, and Passenger but I installed this application that mimics Craigslist.  Included with it is a plugin Simple Captcha to generate captcha for posts. I installed everything but my captcha image wouldn’t load.

I found a Ruby on Rails forum and asked what could be wrong (I was stumped) and the creator of the script answered it and I started troubleshooting with his information. As I googled and googled my nimble little fingers off I decided to look at another website using the same application and that’s when the pieces started to fall into place…

I noticed the font was appeared to be Arial (was it? not sure but my guess led me to the answer). I started looking into how to make sure Imagemagick/RMagick was installed correctly and one site suggested that I do this command:

convert label:abcdef test.gif
It popped out an error along the lines of “can’t find arial.ttf located in /usr/share/fonts/default/TrueType” (I don’t remember the exact error but it was clear)

I recalled in some documentation regarding railslist that it used TrueType fonts for captcha. So I went here: http://corefonts.sourceforge.net/ and compiled them.

It stuck them in /usr/share/fonts/msttcorefonts

So I just copied the fonts inside that folder to /usr/share/fonts/default/TrueType and ran the convert label command and I got a test.gif.

Reloaded my site and it was there.

Popularity: 18% [?]

CentOS, Fonts on Linux, Instant Headache, Passenger, Rails, Ruby

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Leave Comment

(required)

(required)