From: Luis Lavena Date: 2010-02-04T21:44:15+09:00 Subject: Re: ruby-serialport with Ruby 1.9 error On Feb 4, 3:40 am, Tim Ngua wrote: > I'm a newbie programmer and I've been trying to communicate with an > Arduino using the ruby-serialport library. If I run this: > > require 'rubygems' > require 'serialport' > sp = SerialPort.new "COM3", 9600 > sp.write "H" > puts sp.read   # hopefully "OK" ;-) > > I get this error (as a windows pop-up box): > > 'The application has failed to start because msvcrt-ruby18.dll was not > found. Re-installing the application may fix the problem.' > > and this ruby error in my command line window: > > D:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-serialport/lib/serialport.rb:1:in > `require': 126: > The specified module could not be found.   - > D:/Ruby19/lib/ruby/1.9.1/i386-mingw32/serialport.so (LoadError) >         from > D:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-serialport/lib/serialport.rb:1:in > `' >         from ser.rb:2:in `require' >         from ser.rb:2:in `
' > > As far as I can see, the serialport library was supposed to work with > 1.8. There doesn't seem to be a 1.9 version on the GitHub repository > either. > You've installed a Binary gem for 1.8 when you've tried to use Ruby 1.9 Please install a gem binary gem that is compatible with Ruby 1.9 or force the compilation process indicating the "ruby" platform: gem install ruby-serialport --platform=ruby I can't comment on the state of the gem itself, but if you used RubyInstaller and the Development Kit, building other gems could be straight forward as *nix OS. http://rubyinstaller.org/ http://wiki.github.com/oneclick/rubyinstaller/development-kit -- Luis Lavena