rubyworks / smeagol

Read-Only Gollum Server
http://rubyworks.github.com/smeagol
Other
92 stars 5 forks source link

Encoding error #37

Closed trans closed 12 years ago

trans commented 13 years ago

Got this error trying to run smeagol-static

/usr/local/lib/ruby/gems/1.9.1/gems/sanitize-1.2.1/lib/sanitize.rb:120:in `[]=':
incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
from /usr/local/lib/ruby/gems/1.9.1/gems/sanitize-1.2.1/lib/sanitize.rb:120:in `clean!'
from /usr/local/lib/ruby/gems/1.9.1/gems/sanitize-1.2.1/lib/sanitize.rb:98:in `clean'
from /usr/local/lib/ruby/gems/1.9.1/gems/sanitize-1.2.1/lib/sanitize.rb:49:in `clean'
from /usr/local/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/markup.rb:46:in `render'
from /usr/local/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/page.rb:123:in `formatted_data'
from /usr/local/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/page.rb:84:in `title'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/lib/smeagol/views/page.rb:17:in `page_title'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `[]'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `find'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:99:in `block in fetch'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:95:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:95:in `fetch'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/context.rb:77:in `[]'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/template.rb:44:in `render'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache/template.rb:43:in `render'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache.rb:123:in `render'
from /usr/local/lib/ruby/gems/1.9.1/gems/mustache-0.99.4/lib/mustache.rb:84:in `render'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:63:in `block in build_blob'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:62:in `open'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:62:in `build_blob'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:49:in `block in build_tree'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:43:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:43:in `build_tree'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:78:in `build'
from /usr/local/lib/ruby/gems/1.9.1/gems/smeagol-0.5.9/bin/smeagol-static:115:in `<top (required)>'
trans commented 13 years ago

Looks like the error occurs if the name of a file is not ASCII-8? I had a page name with µ in it.

trans commented 12 years ago

We need a way to fix this more generally, because it is happening to me again and I can't find what's causing it.

Anyone with a good understanding of encoding have a solution?

trans commented 12 years ago

It was a Gollum issue and updating Gollum takes care of it.