gollum: 5.x: drag/drop an image to the edit area gives "error uploading file: error" message

gollum -v : Gollum 4.1.2 gollum started as: gollum --css --allow-uploads page --config config.rb --page-file-dir wiki_ config.rb:

Precious::App.set(:wiki_options, { 
        :universal_toc => true,
        :per_page_uploads => true,
})

Trace output is:

== Sinatra (v1.4.8) has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on 0.0.0.0:4567, CTRL+C to stop
2018-08-03 16:35:59 - TypeError - no implicit conversion of Symbol into Integer:
        /home/cb/.gem/ruby/2.5.1/gems/gollum-4.1.2/lib/gollum/app.rb:187:in `[]'
        /home/cb/.gem/ruby/2.5.1/gems/gollum-4.1.2/lib/gollum/app.rb:187:in `block in <class:App>'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/xss_header.rb:18:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/path_traversal.rb:16:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/json_csrf.rb:18:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-protection-1.5.5/lib/rack/protection/frame_options.rb:31:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-1.6.10/lib/rack/nulllogger.rb:9:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/rack-1.6.10/lib/rack/head.rb:13:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
        /home/cb/.gem/ruby/2.5.1/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
        /home/cb/.gem/ruby/2.5.1/gems/thin-1.7.2/lib/thin/connection.rb:86:in `block in pre_process'
        /home/cb/.gem/ruby/2.5.1/gems/thin-1.7.2/lib/thin/connection.rb:84:in `catch'
        /home/cb/.gem/ruby/2.5.1/gems/thin-1.7.2/lib/thin/connection.rb:84:in `pre_process'
        /home/cb/.gem/ruby/2.5.1/gems/thin-1.7.2/lib/thin/connection.rb:50:in `block in process'
        /home/cb/.gem/ruby/2.5.1/gems/eventmachine-1.2.7/lib/eventmachine.rb:1077:in `block in spawn_threadpool'

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 30 (30 by maintainers)

Commits related to this issue

Most upvoted comments

@dometto I can reproduce the NoMethodError - undefined method blobs on RJGit (I’m running gollum with --allow-uploads page). The problem seems to be that in committer.add_to_index the tree variable becomes a Blob in some instances:

tree is #<RJGit::Blob:0x7e59e828 ...>

The subsequent tree.blobs.each subsequently fails because a Blob instance does not have a blobs method. This part makes sense.

There is a tree initially, obtained by a call to index.current_tree, but the “transformation” happens here with this call: tree = tree / dir.

I’m not sure I understand the logic of what’s happening there though, could you enlighten me?