Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
checksum Release 1.0.2. Nov 13, 2014
pkg I can haz initial commit? Apr 13, 2012
task Use the correct version in the tag task. Sep 10, 2014
.editorconfig First step in modernizing the project layout. Sep 10, 2014
.gitignore First step in modernizing the project layout. Sep 10, 2014
.yardopts First step in modernizing the project layout. Sep 10, 2014
CONTRIBUTING.md Added code of conduct Jan 22, 2016
Gemfile Updating Gemfile to use HTTPS version of RubyGems. Sep 3, 2014
README.md Updated brew installation instructions for aspell Mar 13, 2017
Rakefile Load the Gemspec in the Rakefile. Sep 10, 2014



FFI::Aspell is an FFI binding for the Aspell library. It was mainly written as Raspell, a C binding for Aspell, is buggy and no longer maintained by the main author as of April 2012.


  • Ruby 1.9.3 or newer
  • Aspell
  • Aspell language packs for your used language(s)

For running the tests the following language packs are required:

  • Dutch: aspell-nl
  • English: aspell-en
  • Greek: aspell-el

Aspell can be installed as following:

  • Arch Linux: sudo pacman -S aspell
  • Ubuntu: sudo apt-get install aspell libaspell-dev
  • OS X: brew install aspell --with-lang-en --with-lang-el --with-lang-nl
    • If you have homebrew installed to somewhere other than /usr/local (such as /opt/boxen/homebrew for Boxen users), you may have to simlink the library file like so:
sudo ln -s $(brew --prefix)/lib/libaspell.dylib /usr/local/lib/libaspell.dylib


Install the gem:

gem install ffi-aspell

Load it:

require 'ffi/aspell'

The primary class is FFI::Aspell::Speller, this class can be used to check for spelling errors and the likes:

speller = FFI::Aspell::Speller.new('en_US')

if speller.correct?('cookie')
  puts 'The word "cookie" is correct'
  puts 'The word "cookie" is incorrect'


You can use Speller.open to avoid having to call #close explicitly:

FFI::Aspell::Speller.open('en_US') do |speller|
  puts speller.correct?('cookie')

For more information see the YARD documentation.


All source code in this repository is subject to the terms of the Mozilla Public License, version 2.0 unless stated otherwise. A copy of this license can be found the file "LICENSE" or at https://www.mozilla.org/MPL/2.0/.