运行文档示例时出现pandoc-ruby错误

时间:2013-08-20 12:22:27

标签: ruby pandoc

使用pandoc-ruby运行以下脚本时(直接来自文档)我收到错误。

require 'rubygems'
require 'pandoc-ruby'
puts PandocRuby.convert('# Markdown Title', :from => :markdown, :to => :html)

输出:

[dan@FIOS-RH test-markdown]$ ruby convert.rb 
/usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:250:in `format_flag': undefined method `length' for :from:Symbol (NoMethodError)
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:241:in `create_option'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:225:in `prepare_options'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `each'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `prepare_options'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:227:in `prepare_options'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `each'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:222:in `prepare_options'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:131:in `convert'
    from /usr/lib/ruby/gems/1.8/gems/pandoc-ruby-0.7.4/lib/pandoc-ruby.rb:86:in `convert'
    from convert.rb:3

[dan ]$ pandoc --version
pandoc 1.11.1
...

[dan ]$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

pandoc-ruby version: 0.7.4

我错过了一些明显的东西吗?

0 个答案:

没有答案