Search code examples
rubyprocessingjruby

Where is the ~/.jruby_art folder when installing JRubyArt (previously Ruby-Processing)?


I'm currently stuck with the next step where I have to set PROCESSING_ROOT for Mac and can't locate the ~/.jruby_art folder. It's suppose to be in the home folder. I don't see jruby_art hidden in the home directory either.

Stuck here: → k9 --install WARN: you need to set PROCESSING_ROOT in ~/.jruby_art/config.yml.

When I open the path in the editor and try to save it, it says ~/.jruby_art/config.yml does not exist.

The gem files are installed here: ~/.rvm/gems/jruby-9.1.7.0/gems/jruby_art-1.3.3/lib/jruby_art

The config.rb file reads:

The wrapper module

module Processing
  unless defined? RP_CONFIG
    config_path = '~/.jruby_art/config.yml'
    begin
    CONFIG_FILE_PATH = File.expand_path(config_path)
    RP_CONFIG = YAML.load_file(CONFIG_FILE_PATH)

The config.rb file does give some indication the .yml file should be there in the home directory.

Any idea on if it's a path issue when trying to locate ~/.jruby_art/config.yml? Where could this file be? I installed Processing with Homebrew if that makes a difference on why I can't find the path to the file.

Thanks if anyone can shed some light.


Solution

  • Unless you have an old version, this leads me to believe the config should be generated for you when running k9 --install:

    https://github.com/ruby-processing/JRubyArt#configuration

    The error message you see is misleading as an exception will be raised if the config file doesn't exist or there's a parse error, rather than just missing PROCESSING_ROOT:

    https://github.com/ruby-processing/JRubyArt/blob/301509c4c726e1bdfc5a44638e0333a0d148d7b8/lib/jruby_art/config.rb#L13

    If you're on the latest version then I'd raise a Github issue.

    For what it's worth, my OS X config is as follows although I installed this a few years back!

    Horus:.jruby_art msp$ pwd
    /Users/msp/.jruby_art
    
    Horus:.jruby_art msp$ cat config.yml 
    PROCESSING_ROOT: /Applications/Processing.app/Contents/Java
    MAX_WATCH: 30
    #JRUBY: 'false'