Error Message Errno ENOENT and no preview

Problems with folder names with non-US-ASCII characters. See below for the remedy.

Symptom: Errno::ENOENT message

When rendering a preview, an error message like the following appears in the console:

Error rendering asciidoctor: org.jruby.exceptions.RaiseException: (Errno::ENOENT) file:/C:/Users/....gemspec

The preview doesn’t show.

Environment: Windows or a non-UTF-8 default encoding

This seems to happen mostly on Windows systems as they don’t default to UTF-8 charsets. Linux systems usually default to UTF-8 and are not affected.

Cause: Folder names with non-US-ASCII characters

Running Microsoft Windows, there seems to be a problem that JRuby can’t read a folder name when it contains non-US-ASCII characters that would require a UTF-8 encoding.

This has been documented first in Issue 210

Remedies

Upgrade to the latest IntelliJ and plugin version

This issue can be resolved by upgrading to the latest version of IntelliJ and the AsciiDoc plugin.

This was tested successfully for the following environment:

  • IntelliJ version 2020.3.1,

  • AsciiDoc Plugin version 0.32.5,

  • Windows 10 with charset Windows-1252 and

  • Plugin folder containing umlauts.

Add the file encoding VM option to IDE

Put the following as a new line at the end of IDE’s VM options file:

-Dfile.encoding=UTF-8

Users can open the file from their IDE via Help  Edit custom VM options…​.

The online documentation of IntelliJ explains how to find this file in the local file system.