Translation to JSON Evidence when using the oj adapter on MRI throws the error:
.../gems/bel-0.4.2/lib/bel/json/adapter/oj.rb:23:in `to_stream': to_stream() expected an IO Object. (ArgumentError)
from .../gems/bel-0.4.2/lib/bel/json/adapter/oj.rb:23:in `write'
from .../gems/bel-0.4.2/lib/bel/json.rb:30:in `write'
from .../gems/bel-0.4.2/lib/bel/translator/plugins/json_evidence/translator.rb:28:in `block in write'
from .../gems/bel-0.4.2/lib/bel/translator/plugins/json_evidence/translator.rb:48:in `each'
from .../gems/bel-0.4.2/lib/bel/translator/plugins/json_evidence/translator.rb:48:in `each'
from .../gems/bel-0.4.2/lib/bel/translator/plugins/json_evidence/translator.rb:48:in `write'
from .../gems/bel-0.4.2/lib/bel/translate.rb:53:in `translate'
from .../gems/bel-0.4.2/bin/bel:286:in `run'
from .../gems/bel-0.4.2/bin/bel:411:in `<top (required)>'
from .../bin/bel:23:in `load'
from .../bin/bel:23:in `<main>'
The method Oj.to_stream() expects to write to an IO object, but in this case for the JSON Evidence translator it is nil. A nil IO would indicate to return the encoded JSON string.
Translation to JSON Evidence when using the oj adapter on MRI throws the error:
The method
Oj.to_stream()
expects to write to an IO object, but in this case for the JSON Evidence translator it isnil
. Anil
IO would indicate to return the encoded JSON string.