我使用Octopress(jekyll)作爲博客引擎/生成器。當我包含一段代碼與Octopress包含代碼崩潰
{% include_code foo.bar %}
語法,它完全崩潰。如果我使用其他語法在標記內部編寫代碼,也會發生這種情況
``` ruby
puts foo
```
但是隻有當我指定一種語言時。
我不知道如何解決它和答案上類似的問題在這裏計算器沒有導致我的解決方案!補丁寶石不起作用,插入RubyPython::Interpreter.configure
等插件也沒有。
我正在運行ArchLinux。
這裏的錯誤輸出:
~/blog$ rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /home/matthias/blog/_config.yml
/usr/lib/ruby/gems/1.9.1/gems/blankslate-3.1.2/lib/blankslate.rb:51: warning: undefining `object_id' may cause serious problems
Building site: source -> public
File "<string>", line 1
import sys; print sys.executable
^
SyntaxError: invalid syntax
sh: - : Ungültige Option
Benutzung: sh [Lange GNU Option] [Option] ...
sh [Lange GNU Option] [Option] Script-Datei ...
Lange GNU Optionen:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
Shell-Optionen:
-irsD oder -c Kommando (Nur Aufruf)
-abefhkmnptuvxBCHP oder Option -o
sh: - : Ungültige Option
Benutzung: sh [Lange GNU Option] [Option] ...
sh [Lange GNU Option] [Option] Script-Datei ...
Lange GNU Optionen:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
Shell-Optionen:
-irsD oder -c Kommando (Nur Aufruf)
-abefhkmnptuvxBCHP oder Option -o
/usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:121:in `block in ffi_lib': Could not open library 'lib.so': lib.so: cannot open shared object file: No such file or directory (LoadError)
from /usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `map'
from /usr/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `ffi_lib'
from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython/python.rb:29:in `<module:Python>'
from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython/python.rb:21:in `<top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `load'
from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `reload_library'
from /usr/lib/ruby/gems/1.9.1/gems/rubypython-0.5.3/lib/rubypython.rb:104:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/pygments.rb-0.2.13/lib/pygments/ffi.rb:8:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/pygments.rb-0.2.13/lib/pygments/ffi.rb:82:in `highlight'
from /home/matthias/blog/plugins/pygments_code.rb:24:in `pygments'
from /home/matthias/blog/plugins/pygments_code.rb:14:in `highlight'
from /home/matthias/blog/plugins/backtick_code_block.rb:37:in `block in render_code_block'
from /home/matthias/blog/plugins/backtick_code_block.rb:13:in `gsub'
from /home/matthias/blog/plugins/backtick_code_block.rb:13:in `render_code_block'
from /home/matthias/blog/plugins/octopress_filters.rb:12:in `pre_filter'
from /home/matthias/blog/plugins/octopress_filters.rb:28:in `pre_render'
from /home/matthias/blog/plugins/post_filters.rb:112:in `block in pre_render'
from /home/matthias/blog/plugins/post_filters.rb:111:in `each'
from /home/matthias/blog/plugins/post_filters.rb:111:in `pre_render'
from /home/matthias/blog/plugins/post_filters.rb:166:in `do_layout'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/post.rb:189:in `render'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:193:in `block in render'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:192:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:192:in `render'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/site.rb:40:in `process'
from /usr/lib/ruby/gems/1.9.1/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
from /usr/bin/jekyll:19:in `load'
from /usr/bin/jekyll:19:in `<main>'
~/blog$
這導致我另一個錯誤說'無法獲取標題。 (MentosError)'。 – musicmatze