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
2009-04-03
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.
You can verify that I've written this post by following the verification instructions:
curl -LO http://barkingiguana.com/2009/04/03/aspell-for-ruby-with-macports-installed-aspell.html.orig
curl -LO http://barkingiguana.com/2009/04/03/aspell-for-ruby-with-macports-installed-aspell.html.orig.asc
gpg --verify aspell-for-ruby-with-macports-installed-aspell.html.orig{.asc,}