Aspell for Ruby with MacPorts installed Aspell

If you'd like to use Aspell and you use MacPorts to manage software on your Mac then you might run into a problem compiling the native extensions for RAspell. There's a pretty large error log, but the important part is this line:

raspell.h:6:20: error: aspell.h: No such file or directory

It can't find the Aspell headers even though it's been installed by MacPorts. Well, here's the fix: tell RubyGems where MacPorts has installed Aspell.

# Install the Aspell port
sudo port install aspell
# Install the Ruby bindings for Aspell
sudo gem install raspell -- --with-opt-dir=/opt/local
written by
Craig
published
03 Apr 2009

Disagree? Found a typo? Got a question? If you'd like to have a conversation about this post, email craig@barkingiguana.com. I don't bite.

My opinions are my own and my employer can't have them.