Hi.
I am trying to talk to a USB device (a thumb drive) in Windows 7 via
Ruby. I installed the Ruby-USB gem without errors. I tried a simple code
snippet wherein I tried to list all the USB devices connected on the
system -
require ‘usb’
USB.devices
However, in IRB, this is just outputting []. I tried to use
USB.find_devices and that is outputting 0.
What exactly am I doing wrong? Do I need to give admin rights to Ruby
under Win 7 to detect USB devices. If yes, can someone enlighten me how
to do it?
If this is a repost, kindly excuse.
Thanks
On Dec 19, 3:39am, “Srinivasan R.” [email protected]
wrote:
However, in IRB, this is just outputting []. I tried to use
USB.find_devices and that is outputting 0.
Did you install libusb? libusb is a driver require by ruby-usb to
communicate on Windows to the USB layer.
http://www.libusb.org/
I have no experience with this, so beyond these two comments, cannot
give you more help
What exactly am I doing wrong? Do I need to give admin rights to Ruby
under Win 7 to detect USB devices. If yes, can someone enlighten me how
to do it?
You will need to start a command prompt elevated (admin rights) look
on Google for “elevate.vbs” which is a command line script that mimics
sudo.