hparra / ruby-serialport

ruby-serialport is a Ruby library that provides a class for using RS-232 serial ports

Home Page:http://rubygems.org/gems/serialport

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation fault on ruby 1.9.2 in rvm

cmol opened this issue · comments

Hi
I have a small script to test serial communication, but I'm running into a segfault when running it with ruby 1.9.2 in rvm. I use the serialport gem.

The script runs fine on the system ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux], however on 1.9.2 I get:

cmol: rvm 1.9.2
cmol: ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
cmol: ./serialtest.rb
/home/cmol/.rvm/gems/ruby-1.9.2-p0/gems/serialport-1.0.4/lib/serialport.rb:16: [BUG] Segmentation fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]

Aborted

I'm running Ubuntu 10.10 by the way.

I have just found my stupid issue. I have #!/usr/bin/ruby at the start of my script, so if i call it with ruby serialtest.rb, everything works fine.

Sorry.

No worries. I've used rvm on my mac, so I know it can be a little funny. There's a windows equivalent too.