replace deprecated STR2CSTR (removed in ruby 1.9.2) with StringValuePtr according to: http://www.ruby-forum.com/topic/215406