Debugging MATLAB app?

Hi All,

I was trying to install OOD Apps (in a sandbox, as a user). For Matlab, I get an Internal Server Errorr with some long Ruby error msg.

#<ActionView::Template::Error: undefined method `map’ for nil:NilClass>

/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/helpers/form_options_helper.rb:364:in `options_for_select’
etc. etc.

I suspect there might be some bad or missing files in one of the .erb files I changed. Where to look for logs/debugging info? Thanks!

Grigory Shamov
University of Manitoba

You have an options section with nothing in it like so:

  account:
    label: "Project"
    widget: select
    options:
  the_next_field:

You just need to populate options with an array like:

  account:
    label: "Project"
    widget: select
    options:
      - 'the first option'
      - 'the second option'
  the_next_field:

Thanks for reaching out. I’m marking this as solved as I was able to replicate the issue and there is no real answer to your question - the stack trace you got is about as much information as the system has about the issue.

I did however create this issue ticket so that maybe in the future errors like this will be a little bit easier to diagnose (because we’ll tell you directly what the issue is).

Thanks, it did help!

Hi Jeff,

The “project” options, in case of SLURM seems to be accounting groups. (which is not the same as UNIX groups for our system).

Is there a way to either get the AGs automatically from SLURM , for a given user, or to replace the “select” widget with a text form?


Grigory Shamov

You can execute commands in the form.yml.erb with backticks like

output_from_thing = `/bin/bash do_this_thing`

But I’d advise against it just because it could fail or timeout or any number of other bad things could go wrong and prevent the app from working.

The default for form items is text field so simply remove all the items in attributes and keep the entry in the form section and it’ll be a text field.

Or you could pre populate the list, maybe based on unix groups. Or maybe you could dump the AGs into a json or csv file and read that file in the form.yml.erb. That may be safer than executing commands but I’d warn against reading off of network filesystems becuase if you have an outage on them - well this app is now in the blast radius. So if you go the route of periodically dumping AGs into a file that this app then reads - use local storage and be sure to account for cases when you can’t read the file or you can’t parse it correctly.