Unless you are a vim or emacs aficionado you should probably prefer atom.

Install Atom

See website (or scroll to bottom of releases page for downloads on github)

For linux ignore any distro version and download latest version:-

sudo dpkg --install atom-amd64.deb # debian, mint, ubuntu
sudo pacman -S atom # Archlinux currently installs 1.42.0

MacOS/Windows users could just download direct (or homebrew on MacOS)

Tough luck if you want the 32 bit version on debian linux

Install Packages

From the atom editor install the atom-k9 package by Martin Prout (monkstone)

While you are at install the language-jruby-art package also by Martin Prout for code snippets (includes a bare JRubyArt sketch)

Also install set-syntax package by Lee Dohm to allow easy setting of buffer syntax

Watching Sketches (a pseudo REPL)


To watch sketches you should create a new folder (to avoid watching too many files) and to reliably pick up the local environment (eg path to k9) you should start atom from a terminal (gnome-terminal linux, mintty cygwin).

mkdir watch # create a new folder
cd watch # navigate to folder
touch my_sketch.rb # create an empty file
atom my_sketch.rb # fire up atom from command line (to pick up local environment)

Make sure you are in JRuby Art edit mode (click on bottom right hand corner to choose).

Or if you’ve installed set-syntax load command palette with ctrl-shift-p and enter ssjru to choose.

The use bare snippet to create sketch, NB: below gif has not been updated to show red JRA label that helpfully highlights core JRubyArt snippets

enter 'bare'

Use ctrl-s to save.

For a pseudo REPL select watch from menu or ctrl+shift+alt+w. Then the sketch will reload on ctrl-s after edit.

If you want to avoid need to start from a terminal, create a symbolic link to a regular system path to k9 (eg /usr/local/bin/k9), this easily done/managed on debian linux (with update-alternatives)

To run a sketch

To simply run a sketch, navigate to the sketch (file) and use either JRubyArt menu, or ctrl+alt+b.

To close a running sketch

Close the console from the JRubyArt menu (or just close the sketch window)

What’s it look like


Expanding / Modifying snippets

Navigate to ~/.atom/packages/language-jruby-art/snippets and edit language-jruby-art.cson

Linter Ruby Leek package etc

Fans of Sandi Metz will may want to experiment with the linter-ruby-reek and rubocop packages, the latter v. useful for detecting stupid coding errors.