2012-04-14 8 views
6

나는 나의 새로운 맥북에 (지킬 상단에 블로깅 엔진) Octopress를 사용하기 위해 노력하고있어, 나는 bundle exec jekyll --server를 실행할 때이 오류가잘못된 인수 String 형 (예상 배열)

/path/to/markdown.rb:118:in `to_html': wrong argument type String (expected Array) (TypeError) 
from /path/to/markdown.rb:118:in `convert' 
... 

는 (전체 경로)

/usr/local/rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/converters/markdown.rb:118:in `to_html': wrong argument type String (expected Array) (TypeError) 
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/converters/markdown.rb:118:in `convert' 
... 

라인 (118)을 보면, 나는 참조 :

RDiscount.new(content, *@rdiscount_extensions).to_html 

이 줄을 "hello"와 같은 문자열로 바꾸면 서버가 올바르게 시작됩니다. 하지만 RDiscount.new("hello").to_html 같은 것으로 바꾸면 같은 오류가 발생합니다. 그러나 irb를 실행하고 RDiscount.new("hello").to_html을 실행하면 정상적으로 작동합니다.

어떤 아이디어가 잘못 되었나요? 내가 가지고있는 다른 컴퓨터에서 서버를 시작할 수는 있지만 두 컴퓨터가하는 작업의 차이점을 파악하는 방법을 모르겠습니다. (라이브러리의 다른 버전이 어딘가에 있습니까?)

+0

매우 이상한 참조하십시오. 아마도 RDiscount 대신 [kramdown] (http://kramdown.rubyforge.org/)로 전환 해보십시오. – Phrogz

답변

3

그냥 생각했지만 gemset을 업데이트 해 보셨습니까? 최신 버전의 지킬은 0.11.2이며, RDiscount 대신에 기본적으로 maruku를 사용합니다. 내가 할 줄

https://github.com/mojombo/jekyll/wiki/Install

+0

그래, 나는 내 보석 (IIRC, 수동으로 Maruku 대신 RDaskount로 바꿨다. LaTeX 지원 덕분에, 일부 지킬을 따라 갔다. <-> LaTeX 지침에 따라 내가 어딘가에 있었다.) – grautur

1

우선 모든 버전을 확인합니다. 루비 -v, 보석 -v, 보석 목록 -d sinatra, 보석 목록 -d octopress. 차이 등을 찾으십시오.

0

이 오류도 발생했습니다. 새로운 RVM gemset을 만들고 번들 설치를 다시 실행하여 문제를 해결했습니다.

https://github.com/rtomayko/rdiscount/issues/66

$ rvm gemset create gaga 
'gaga' gemset created (/Users/chaffee/.rvm/gems/[email protected]). 
$ rvm use @gaga 
Using /Users/chaffee/.rvm/gems/ruby-1.9.3-p125 with gemset gaga 
$ bundle install 
... 
Installing rdiscount (1.6.8) with native extensions 
... 
$ irb 
>> require 'rdiscount' 
=> true 
>> RDiscount.new("hello").to_html 
=> "<p>hello</p>\n"