2013-08-23 64 views

回答

2

該錯誤意味着沒有名爲USB的類或模塊。您提到的說明似乎使用最初定義USB模塊的舊版本libusb

這裏是如何做到這一點在libusb新版本:

require 'libusb' 

usb = LIBUSB::Context.new 
usb.devices.each{ ... } 

來源:https://github.com/larskanis/libusb

+0

正確答案!非常感謝你! –

+0

那麼考慮把它標記爲接受然後;-) –

+0

也許你可以幫助我,我的新問題? http://stackoverflow.com/questions/18401686/libusb-undefined-method-all-input-usages –

相關問題