存在しない日本語名の画像ファイルを指定するとEncoding::CompatibilityErrorが発生する
Closed this issue · 2 comments
Deleted user commented
存在しない日本語名の画像ファイルを指定するとEncoding::CompatibilityErrorが発生します。
環境
- ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
- rabbit 2.1.9
- Mac OS X El Capitan バージョン 10.11.5
再現手順
下記のslide.md
に対して、rabbit slide.md
を実行する。
slide.md
# Slide
![](あ.png)
ログ
naiad@naiad ~/Desktop $ rabbit slide.md
2016-05-29 15:53:24.896 ruby[3879:95734] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
[エラー]
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/error.rb:29:in `%'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/error.rb:29:in `initialize'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/image.rb:24:in `new'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/image.rb:24:in `initialize'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/element/image.rb:28:in `initialize'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/ext/image.rb:16:in `new'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/ext/image.rb:16:in `make_image'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:337:in `convert_img'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:30:in `convert'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:37:in `block in convert_container'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:36:in `each'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:36:in `convert_container'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:150:in `convert_p'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:30:in `convert'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:37:in `block in convert_container'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:36:in `each'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:36:in `convert_container'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:51:in `convert_root'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown/converter.rb:30:in `convert'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser/markdown.rb:124:in `parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/parser.rb:21:in `parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/canvas.rb:333:in `block in parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/canvas.rb:726:in `keep_index'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/canvas.rb:330:in `parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/frame.rb:56:in `parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:705:in `parse'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:863:in `do_display'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:59:in `block in run'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.8/lib/gobject-introspection/loader.rb:551:in `invoke'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.8/lib/gobject-introspection/loader.rb:551:in `block in define_method'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:54:in `block in run'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.8/lib/gobject-introspection/loader.rb:551:in `invoke'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/gobject-introspection-3.0.8/lib/gobject-introspection/loader.rb:551:in `block in define_method'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:64:in `run'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/lib/rabbit/command/rabbit.rb:29:in `run'
/Users/naiad/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rabbit-2.1.9/bin/rabbit:22:in `<top (required)>'
/Users/naiad/.rbenv/versions/2.3.1/bin/rabbit:23:in `load'
/Users/naiad/.rbenv/versions/2.3.1/bin/rabbit:23:in `<main>'
kou commented
報告ありがとうございます。
直しました。
Deleted user commented
修正、ありがとうございました ❗