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:
- curl -L https://get.rvm.io | bash -s stable --ruby
- source ~/.rvm/scripts/rvm
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?