basho / cuttlefish

never lose your childlike sense of wonder baby cuttlefish, promise me?
Apache License 2.0
205 stars 124 forks source link

no function clause matching cuttlefish_vmargs:'-stringify/1-lc$^0/1-0-'(undefined) [JIRA: RIAK-2498] #152

Open rlipscombe opened 10 years ago

rlipscombe commented 10 years ago
escript: exception error: no function clause matching 
                 cuttlefish_vmargs:'-stringify/1-lc$^0/1-0-'(undefined) (src/cuttlefish_vmargs.erl, line 13)
  in function  cuttlefish_escript:engage_cuttlefish/1 (src/cuttlefish_escript.erl, line 390)
  in call from cuttlefish_escript:generate/1 (src/cuttlefish_escript.erl, line 259)
rlipscombe commented 10 years ago

It appears that you're required to have at least one setting with a vm_args mapping, and you have to have it in both the schema and in the source config file. This could do with either a better error message or a mention in the documentation (or both).

(I'm building this up from scratch because we're using relx for our releases).

RJ commented 8 years ago

I ran into this too, i'm including a vmargs setting in my main schema too for now as a workaround.

Fix in cuttlefish_vmargs is probably just a clause to turn undefined into an empty list. I don't think any vmargs settings are strictly necessary.

stringify(undefined) -> [];
stringify(.....
rlipscombe commented 5 years ago

Having just found this again after more than 5 years, I'm going to expand on my comment. You need at least schema/vm_args.schema containing:

{mapping, "nodename", "vm_args.-sname", []}.

...and you need a nodename = foo setting in app.conf.

rlipscombe commented 5 years ago

...but https://github.com/basho/cuttlefish/issues/152#issuecomment-209341849 works fine, once you persuade rebar3 to actually rebuild the damn thing.