Ruby-serialport mechanics

I want to use ruby-serialport on ubuntu with ruby 1.8.7.

First I downloaded version 1.0.4 from github and compiled it myself,
second I installed the ubuntu package libserialport-ruby.

Both packages do not load serialport.rb via require ‘serialport.so’ and
so dont know about class SerialPort.

The consequence is, that SerialPort.new doesn’t accept a string as its
first parameter and directly calls IO#create to open one of the standard
streams.

Literally including the class SerialPort int my source text causes
SerialPort to work properly.

What is the reason for this odd behaviour?


Additional info: I use 64-bit ubuntu.

Installing libserialport-ruby results in
/usr/local/lib/site_ruby/1.8/x86_64-linux/serialport.so, but there is no
serialport.rb.

After copying serialport.rb to …/x86_64-linux and modifying the
require statemt in my source text to

 require 'serialport'

causes ruby to first load serialport.rb, which itself requires
serialport.so

On Sep 5, 2011, at 5:28, Fritz T. [email protected] wrote:

I want to use ruby-serialport on ubuntu with ruby 1.8.7.

First I downloaded version 1.0.4 from github and compiled it myself,
second I installed the ubuntu package libserialport-ruby.

Both packages do not load serialport.rb via require ‘serialport.so’ and
so dont know about class SerialPort.

Then just require ‘serialport’