Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gollum Wiki - undefined method `new' for Redcarpet:Module

I'm trying to use Gollumn Wiki, so I could edit my GitHub Wiki but I can't seem to get it to work.

I'm on Ubuntu 11.10, 64Bit.

I've tried this as well with Ruby 1.9, also the same error.

I cloned my GitHub Wiki git repository for my project, fired up Gollum, and this is the error I recieved:

NoMethodError at /
undefined method `new' for Redcarpet:Module

The full stack trace is:

: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 

Any help would be appreciated.

like image 310
Mark Mandel Avatar asked Dec 06 '11 04:12

Mark Mandel


2 Answers

Try reinstalling redcarpet like this:

gem uninstall redcarpet gem install redcarpet --version=1.17.2 

If using bundler, put in your Gemfile

gem 'redcarpet', '1.17.2' gem 'gollum' 
like image 181
ffyns Avatar answered Sep 19 '22 11:09

ffyns


I am trying to use Gollum as my documentation for new projects and this problem hit me recently also. To solve this I isolated the changes using Bundler. In my cloned Gollum directory on my local machine I did the following:

# Create a Gemfile with the following: source "http://rubygems.org" gem 'redcarpet', '1.17.2' gem 'gollum' 

Next just run bundle install to set everything up. When you are ready to start the gollum server run bundle exec gollum from the command line.

This will give you a nice isolated gollum server using the gems you specifically bundled and will solve this problem discussed in your question.

like image 42
SnapShot Avatar answered Sep 22 '22 11:09

SnapShot