How do I get Ruby to work?


#1

I ran “git clone https://github.com/tehviking/brick_pi_ruby” and then followed the instructions in it and in “http://raspberrypi.stackexchange.com/questions/1010/can-i-install-the-ruby-version-manager”, running:

Then I ran: gem install brick-pi

Everything appears to have installed successfully, but when I run one of the example scripts in brick_pi_ruby, it fails:

$ ruby examples/touch_sensor.rb
examples/touch_sensor.rb:5:in ‘<main>’: undefined method ‘create’ for BrickPi:Module (NoMethodError)

I don’t know Ruby well enough yet, so maybe I did something wrong. How do I fix this and get a simple script working?


#2

I am sorry that no one replied. :disappointed:

This issue should be reported on the ghub repository. It appears that it is unofficial so dexter industries isn’t responsible for its bugs.