ruby-nxt 0.8.1 - Finally available as a Gem 4
I've been pretty busy lately so haven't had much time to work on ruby-nxt. However, tonight I had some time to finally get it packaged into a gem! The main reason it took so long is because of some kind of weird bug with requiring ruby-serialport and rubygems resulting in the following error:
NameError: (eval):1:in `private_class_method': undefined method `create' for class `Class'
from (eval):1
from (eval):1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from (irb):2For some reason, it doesn't like rubygem's custom require code. So I got around it by doing a Kernel::require "serialport".
Unfortunately, there's really no way to include ruby-serialport in the ruby gem, so you'll still have to download and install that seperately. Once serialport is installed, all you should have to do is sudo gem install ruby-nxt. Then in your code require "rubygems" then require "nxt_comm" or require "nxt" depending on how you want to use it.
The 0.8.1 release doesn't have anything new in terms of features, however you might want to take a look at examples/drb_server.rb ;)
Trackbacks
Use the following link to trackback from your own site:
http://www.juju.org/articles/trackback/875
Juju
nice job! congrats on the gem release...
I think nxt.rb's requires are wrong in the gem for the lightsensor and ultrasonicsensor. I got an error with the gem, but when I dl'd the code and changed the paths it worked OK.
What error do you get?
Hey cool, this is very useful :)
I wrote a simple bulk usb driver for nxt for linux (i am using usb to communicate with my nxt), so I don't really need serial stuff -just reading/writing from /dev/legonxt using some of your code.