With rubygems installed, you may get the following error message (at least on WinXP) when using serialport extension:
(eval):1: (eval):1:in `private_class_method': undefined method `create' for class `Class' (NameError)
from (eval):1
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
I managed to fix this by moving the ruby part of the extension into separate ruby file from the c source (rb_eval_string()
call).
Attached is a patched distribution, which has additional lib/serialport.rb ruby file including the ruby part (moved
from the c-source). It is installed automatically with "make install", and when using the extension you shoud
use "require 'serialport'" instead of serialport.so. |