# GD on OS X?

**URL:** <https://www.ruby-forum.com/t/gd-on-os-x/71599>\
**Category:** Rails\
**Created:** [October 10, 2006, 7:37am UTC](https://www.ruby-forum.com/t/gd-on-os-x/71599 "2006-10-10T07:37:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay-levitt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a88e57/32.png) [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Post date:** [October 10, 2006, 7:37am UTC](https://www.ruby-forum.com/t/gd-on-os-x/71599/1 "2006-10-10T07:37:03Z")

</div>

I’m implementing captcha feature on my site, but having problem in  
installing GD.  
I want to use captcha gem, so I installed GD2 through darwinport.

sudo port install gd2

And then, I installed gd gem and captcha gem.

sudo gem install gd2  
sudo gem install captcha

However, I’m still having error message as follows:

no such file to load – GD  
…  
…  
This error occured while loading the following files:  
captcha.rb  
GD

I’m using MacBook Pro for the development. Has anyone successfully  
installed GD on OS X?

---

<div class="post-metadata">

**Author:** ![jay-levitt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a88e57/32.png) [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Post date:** [October 10, 2006, 4:39pm UTC](https://www.ruby-forum.com/t/gd-on-os-x/71599/2 "2006-10-10T16:39:20Z")

</div>

This isn’t what you asked (as I’ve never tried to compile GD on OS X)  
but why don’t you try ImageMagick & RMagick (the ruby binding).

[http://rmagick.rubyforge.org/install-osx.html](http://rmagick.rubyforge.org/install-osx.html)

(PS, lib tiff seems to be fixed in the ports).

-carl

---

<div class="post-metadata">

**Author:** ![jay-levitt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a88e57/32.png) [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Post date:** [October 10, 2006, 9:17pm UTC](https://www.ruby-forum.com/t/gd-on-os-x/71599/3 "2006-10-10T21:17:04Z")

</div>

Carl L. wrote:

> This isn’t what you asked (as I’ve never tried to compile GD on OS X)  
> but why don’t you try ImageMagick & RMagick (the ruby binding).
> 
> [http://rmagick.rubyforge.org/install-osx.html](http://rmagick.rubyforge.org/install-osx.html)
> 
> (PS, lib tiff seems to be fixed in the ports).
> 
> -carl

I tried rmagick but couldn’t find nice captcha solution with this.  
Can you point me something if you know one?

BTW, I’m not sure I’m figuring it out correctly, but I think RoR can’t  
find GD installation.  
GD is installed under /opt/local where darwinport maintains all the  
sources and binaries, and RoR is installed under /usr/local.  
I followed this instruction  
([Dan Benjamin](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger))  
when I installed RoR, and now I wonder if gd works if I installed RoR  
and everything with darwinport.

However, I’m trying to install gd from source to make everything is  
under /usr/local but having problem in compiling with some libraries.  
Frustrating ☹
