nakajima / slidedown

Generate syntax-highlighted slides from Markdown
http://nakajima.github.com/slidedown
438 stars 45 forks source link

Highlight failed #21

Open Endle opened 10 years ago

Endle commented 10 years ago

I added such code in my markdown file

@@@
    def foo
      :bar
    end
@@@

It works fine.

If I added

@@@
    def foo
      :bar
    end
@@@

slidedown fails.

Error log

/home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `exec': No such file or directory - /usr/local/bin/pygmentize (Errno::ENOENT)
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `block in popen4'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `call'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `block in do_popen'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `fork'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `do_popen'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:34:in `popen4'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:63:in `execute'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:70:in `colorize'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/lib/makers-mark/generator.rb:22:in `block in highlight!'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/node_set.rb:237:in `block in each'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/node_set.rb:236:in `upto'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/node_set.rb:236:in `each'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/lib/makers-mark/generator.rb:19:in `highlight!'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/lib/makers-mark/generator.rb:8:in `to_html'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/slidedown-0.2.0/lib/slide.rb:13:in `html'
    from (erb):37:in `block in render'
    from (erb):34:in `each'
    from (erb):34:in `each_with_index'
    from (erb):34:in `render'
    from /home/lizhenbo/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/erb.rb:849:in `eval'
    from /home/lizhenbo/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/erb.rb:849:in `result'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/slidedown-0.2.0/lib/slidedown.rb:73:in `render'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/slidedown-0.2.0/lib/slidedown.rb:44:in `render'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/slidedown-0.2.0/lib/slidedown.rb:25:in `run!'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/slidedown-0.2.0/bin/slidedown:5:in `<top (required)>'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/bin/slidedown:23:in `load'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/bin/slidedown:23:in `<main>'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
    from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Endle commented 10 years ago

It seems that slidedown needs /usr/local/bin/pygmentize, but on my computer(Cent OS 6.5), it is in /usr/bin/pygmentize

Workaround: ln -s /usr/bin/pygmentize /usr/local/bin/pygmentize