我正在尝试使用Gollumn Wiki,因此我可以编辑GitHub Wiki,但似乎无法正常工作。

我使用的是Ubuntu 11.10、64位。

我也用Ruby 1.9尝试过,同样的错误。

我为我的项目克隆了GitHub Wiki git repository,启动了Gollum,这是我收到的错误:

NoMethodError位于/
Redcarpet:Module的未定义方法“new”

完整的堆栈跟踪为:

:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /var/lib/gems/1.8/gems/gollum-1.3.1/bin/../lib/gollum/frontend/app.rb:17
[2011-12-06 15:20:15] INFO  WEBrick 1.3.1
[2011-12-06 15:20:15] INFO  ruby 1.8.7 (2011-06-30) [x86_64-linux]
== Sinatra/1.3.1 has taken the stage on 4567 for development with backup from WEBrick
[2011-12-06 15:20:20] INFO  WEBrick::HTTPServer#start: pid=22017 port=4567
NoMethodError - undefined method `new' for Redcarpet:Module:
/var/lib/gems/1.8/gems/gollum-1.3.1/lib/gollum/markup.rb:463:in `render'
/var/lib/gems/1.8/gems/gollum-1.3.1/lib/gollum/page.rb:171:in `formatted_data'
/var/lib/gems/1.8/gems/gollum-1.3.1/bin/../lib/gollum/frontend/app.rb:190:in `show_page_or_file'
/var/lib/gems/1.8/gems/gollum-1.3.1/bin/../lib/gollum/frontend/app.rb:42:in `GET /'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `call'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `compile!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `process_route'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `route!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
/var/lib/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/var/lib/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call'
/var/lib/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call'
/var/lib/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
/var/lib/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/var/lib/gems/1.8/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call'
/var/lib/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in `synchronize'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
/var/lib/gems/1.8/gems/rack-1.3.5/lib/rack/handler/webrick.rb:59:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/var/lib/gems/1.8/gems/rack-1.3.5/lib/rack/handler/webrick.rb:13:in `run'
/var/lib/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1295:in `run!'
/var/lib/gems/1.8/gems/gollum-1.3.1/bin/gollum:125
/usr/local/bin/gollum:19:in `load'
/usr/local/bin/gollum:19

任何帮助,将不胜感激。

最佳答案

尝试像这样重新安装redcarpet:

gem uninstall redcarpet
gem install redcarpet --version=1.17.2

如果使用 bundle 器,请输入Gemfile
gem 'redcarpet', '1.17.2'
gem 'gollum'

关于github - Gollum Wiki-Redcarpet:Module的未定义方法 `new',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8395347/

10-15 12:04