Alternatively, you can wrap into a gem with a C extension and call it with all the Ruby goodness you should expect (recommended route).
Pseudo-code (wordier than it need be):
class MyModel
def self.ocr(file) result = system("my_ocr_prog", file.path) return result end
A good example of a gem with a C extension might be RMagick (http://github.com/rmagick/rmagick/tree/master/ext/RMagick/)