I have recently messed around with Sonic Pi and I have got it to play MIDI notes (via play ??.)

However, I am attempting to follow the guide to SonicPi in the MagPi issue 23 and it told me to enter sample :loop_amen as my first command. I did so and pressed ran. However, I am getting this error:

/opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:288: in `eval': undefined method `sample` for #<SpiderLang:0x160f950> (NoMethodError)
    from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:288: in `eval'
    from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:288: in `spider_eval'
    from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:288: in `<main>'

So, I figured oh well. It's just a sample, it's not important. So I kept going and then they had me enter

with_fx :reverb do
    sample :guit_e_fifths

and I get the exact same error, except with a different SpiderLang address.

Does anyone have any clue why all of these errors are occurring? I really want to try out SonicPi, but I can't with these.

  • Are you sure you're running version 2 of Sonic Pi?
    – recantha
    Jun 19, 2014 at 13:55
  • No, actually, I'm not. I'm running 1.0. I didn't realize that 2.0 wasn't available in the Repos yet. I mis-read that section of the article. :P Thanks for the pointer! If you could create an answer, that would be stupendous :) Jun 19, 2014 at 13:58

1 Answer 1


You need to be running version 2 of Sonic Pi for these new functions to work.

Version 2 is available from: http://sonic-pi.net/get-v2.0

Full instructions are on that page. I won't duplicate them here because the new version is still being developed and the release candidate number for the download is being updated regularly.

  • Cool. Version 2 is fantastic. Sam Aaron's really put a lot of work in.
    – recantha
    Jun 19, 2014 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.