small medium large xlarge

06 Oct 2012, 19:32
Rob P (1 post)

I’m working through the good_score example on p. 85 of the book (Day 3 of Riak).

I modified the js_source_dir variable in all three app.config files to read:

{js_source_dir, “/home/myaccount/riak/js_source”},

I put the “my_validators.js” file in that same directory, and I restarted all of the Riak services.

When I run the curl commands (the initial command to set the props precommit variable and the subsequent one to attempt entering an invalid score), I get the following error:

PUT aborted by pre-commit hook

I activated the debugger and looked in the console.log file, and I saw the following:

Error executing pre-commit hook: [{«“lineno”»,1},{«“message”»,«“ReferenceError: good_score is not defined”»},{«“source”»,«“unknown”»}]

On another site, someone suggested that the first curl command (i.e., the initial command to set the props precommit variable) needs to be amended to include a scripting language identifier, but that didn’t help. I still got the same error (as opposed to the custom error that I was hoping for). Incidentally, I get the same error, even if I enter a seemingly valid score.

Any suggestions?

Thanks in advance.

You must be logged in to comment