Skip to content

Instantly share code, notes, and snippets.

@joannecheng
Last active December 21, 2015 05:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joannecheng/6255482 to your computer and use it in GitHub Desktop.
Save joannecheng/6255482 to your computer and use it in GitHub Desktop.
Ruby-Processing install notes

Hello there! So you want to install Ruby-Processing and get started creating some fun programs.

You can simply type gem install ruby-processing from any installation of Ruby. Ruby-Processing requires JRuby to run, but it comes bundled with its own version of JRuby (granted, a very old version: 1.6.4). To run a sketch using an installed version of JRuby, just run your sketch with the --jruby flag. That way you can use installed gems in your sketches.

The version that lives on rubygems.org is the version of Ruby-Processing I used in my presentation. However, this version of Ruby-Processing is technically outdated: it uses Processing version 1.5.4, whereas the current version of Ruby-Processing is using Processing version 2.0.

There are a few reasons why I used an older version for my talk, and why I recommend people use the older version of Ruby-Processing:

  • It's easier to install: the current Ruby-Processing is too big for rubygems.org, so one needs to pull the repo down from github, install it on the right version of jruby.
  • The new version of Ruby-Processing is buggy on the master branch.
  • The command-line tool is no longer as easy to use as before. In the older version of Ruby-Processing, I can type rp5 run [sketchname] to run a sketch, and rp5 run [sketchname] --jruby to run a sketch with a system JRuby. Now I need to type jruby -S rp5 run [sketchname] to run a sketch with JRuby, or I need to type rp5 --nojruby run [sketchname]. I think it's unintuitive and I enjoyed the previous interface much more.
  • Sketches are now simply a setup method and a draw method; there is no class definition. I feel this simplifies the framework too much.
  • When I submitted the proposal for this talk, the version I demoed was the only version that existed. The new version of Ruby-Processing came out roughly 3 weeks before eurucamp, well after I had already done a few versions of my talk. I've looked into contributing to Ruby-Processing, but unfortunately did not have enough time before the conference to fix things up.

So that's why I didn't demo using the latest version of Ruby-Processing, and why I'm advising to use an older version of a gem.

FYI, here is the example sketch I wrote for the talk: https://gist.github.com/joannecheng/6348554

http://bit.ly/rubyprocessinginstallnotes

@JuanitoFatas
Copy link

Thanks so much for writing this! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment