hparra / ruby-serialport

ruby-serialport is a Ruby library that provides a class for using RS-232 serial ports
http://rubygems.org/gems/serialport
GNU General Public License v2.0
246 stars 58 forks source link

Segmentation fault on ruby 1.9.2 in rvm #23

Closed cmol closed 13 years ago

cmol commented 13 years ago

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.

cmol commented 13 years ago

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.

hparra commented 13 years ago

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