-
Notifications
You must be signed in to change notification settings - Fork 94
Installing ruby processing on macOS
Step one install homebrew, this is required because Apple are willfully stupid.
Full instructions at homebrew wiki.
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
or if already installed brew upgrade
to make sure you are up to date
Step two install wget, unless you've already installed it
brew install wget
Step three install Oracle java, you absolutely do not want any Apple version of java (openjdk8 should also work, but is probably best left to experts).
NB: this is not required for vanilla processing (which includes its own version of Oracles jdk1.7.0_XX) but it is required for jruby and ruby-processing
Step four install processing 2.x (for processing-3.0 see JRubyArt), give a donation to processing.org if you like
Use configRP5.pde to create .rp5rc
yaml configuration file (copy to processing ide and run the sketch). Or just use your favourite editor to edit ~/.rp5rc
.
Step five install rvm, I hate it, but I'm on linux
But most people seem to need it or something similar (rbenv is probably better, it doesn't override cd and gem commands to enable some of its functionality). In both cases you are relinquishing control of your system.
curl -sSL https://get.rvm.io | bash -s stable
Step six install jruby
rvm install jruby
If you prefer not to install jruby you should set JRUBY: "false"
in the ~/.rp5rc
config. Otherwise use --nojruby
flag when running sketches. Without jruby installed, using other gems with jruby is tricky....
Using MRI ruby, you don't need jruby here
You can use jruby though if you are keeping jruby and ruby gems separate (like with rvm).
gem install ruby-processing
Uses wget to download.
rp5 setup install
rp5 setup unpack_samples
cd rp_samples
# to run contributed sketches...
rake
# or to run shader sketches...
rake shaders
# or to run vecmath sketches...
rake vecmath
# or just explore all the many other sketches
Step eleven unless you have a favourite editor install jedit
brew install jedit
Install the console plugin and anything else you fancy from jedit (the ruby-plugin is out of date but can be used but it doesn't recognize the latest syntax). Use the macro and commando file here https://gist.github.com/monkstone/9636961 to configure jedit for ruby-processing. Back to getting started.