RubyUSB is a ruby module for quickly and easily building ruby applications that communicate with strange and powerful USB devices (especially devices that implement the USB HID spec). It has two components, a object-oriented C++ library that parses the USB HID datagram, and a ruby layer that wraps the resulting objects and provides easy to use interfaces.

A good place to start is the ruby documentation, which includes lots of example code.

But why stop there? A true hacker would want to check out the raw ruby source code itself which has even more example applications. Or maybe the source of the C++ USB HID parser. This all depends on the latest version of the libusb library, which works for MacOS, BSD, and Linux…you’ll need to download and install the latest version from their source control.

Want an even easier way to interface your devices to ruby? Check out my older project RubyEvdev which lets you link ruby to linux’s evdev protocol and has some nice documentation too.

Have comments? Feature suggestions? Crazy applications you built with this stuff? Why not email me at anything ‘at’ I’m friendly – I can help.

Hey RubyConf MountainWesters – check out the links from my RubyConf MountianWest talk!


  1. Amran Gaye says:

    Hey. Interesting looking project, but it would be nice if there was a link to a download site someone could get it. I tried rubygems but couldn’t find it, and then rubyforge and then google… still nothing. Am I missing something? :-/

  2. buffalo says:

    You need to check it out from my source control. It’s pretty easy – check out this link:

Leave a Reply