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
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
After copying serialport.rb to …/x86_64-linux and modifying the
require statemt in my source text to
causes ruby to first load serialport.rb, which itself requires