Open hparra opened 14 years ago
I would love this as well. I'm on the verge of writing my app in Python, because I can't get a binary of this gem built on my box.
I've wanted to do this, but I remember the last time I looked it wasn't the most pleasant task. Unfortunately a decent "howto make ruby gem binary distro" doesn't exist. That was some time ago though. I'll take a look.
After a lot of googling and trial and error, I actually figured out a pretty quick way of getting it to compile on Windows. I uninstalled my older version of Ruby, and then reinstalled using the Ruby 1.8.7-p302 installer and the DevKit-4.5.0-20100819-1536-sfx.exe development kit from http://rubyinstaller.org/downloads/ . That particular install is compiled using MingW, and the development kit installs a fully baked MingW compiler. Once both of those were installed, the gem install serial-port command was able to compile the gem on demand without errors. I now have a bare bones ruby script reading data from an Arduino Fio coming over a USB to Serial line.
Thanks!
Jordan
Oh, I just assumed you were already using that! It's the best way really. Even then, a binary distro would save you the task of installing the DevKit.
BTW, I highly recommend using Ruby 1.9 under Windows. There's some I/O blocking issues due to unexpected behavior of the green threads implementation under Windows for Ruby 1.8 which was not observed on POSIX systems. Only occurred with a multi-threaded, multi-device program, but if you find I/O blocking on one thread is stopping I/O on all other threads then you may want to take a look.
Good luck with your project. HGP
I like it!
With the standard one-click installers, a person without a development environment has been stuck rummaging around on the web trying to figure out how to use the non-gem approach with references to some serialport.so
A binary distribution would help them a lot and get more users for the library.
my 2cents.