UPDATE: Colin\'s suggestion of removing the line //= require_tree . has fixed the issue.
I have wasted over 2 days trying to follow every suggestion
I favoured the Learning route. It seems the problem stems from
IO.popen(command, options) { |f| output = f.read }
returning an empty string in execjs\external_runtine.rb
(line 173 in version 1.4.0). This is why the error message contains no text. The changes suggested did not work for me. I changed UTF-16LE
to UTF-8
, but it still returned an empty string. I removed \\U
from the command
- this at least returned text, but it was in the wrong encoding - in the browser it displayed as Chinese characters.
According to this MSDN blog post, using the //U
flag and redirecting to a file causes cscript
to return the result using UTF-16
.
And then, magically, it worked (@#%$&^@$%!!!?!?!) using command
as "cscript //E:jscript //Nologo"
and encoding
as "UTF-8"
. Oh well.