This post originated from an RSS feed registered with Ruby Buzz
by Bob Silva.
Original Post: Installing Raspell on Intel Mac
Feed Title: Rails Video Tutorials
Feed URL: http://www.railtie.net/xml/rss/feed.xml
Feed Description: A growing collection of screencasts that show you how to use the many facets of the wonderful world of rails.
I'm working on an app that Special Education therapists use to track service logs on their clients for medicaid billing purposes. While the application requirements are pretty simple (with the exception of the PDF Reports), the requirement that was at the top of their list was spell checking.
Most of the work for a Rails based Spell Checker has been done already by Dee Zsombor in his How to build an AJAX-ed spellchecker with Ruby On Rails article. In his article he shows how to use Raspell (the Ruby ASpell bindings) to implement an AJAX based spell checker in Rails. While his tutorial worked great on Linux, Raspell failed to compile (manually or using the gem) on Intel Mac. The compiler was complaining of multiple symbol errors defined in raspell.h. Even though it had pre-processor IFNDEF statements, it still acted like it was including the header multiple times. While there may be another way to fix this, the quick and simple way was to take all the code from dictinfo.c and aspell.c and inject it into raspell.c. Problem solved.
Hopefully, in a few weeks, I'll be able to release a Rails SpellChecker Plugin which will enable spell checking on any text field/area with a simple Rails helper method.