Giter Site home page Giter Site logo

Comments (8)

nesquena avatar nesquena commented on June 17, 2024

Very odd, I wonder what causes this. I have renamed files and never ran into that. Looks based on the error you are running gitdocs with JRuby? Curious if you get the same behavior on MRI 1.9.2?

from gitdocs.

chriskempson avatar chriskempson commented on June 17, 2024

Apologies for the misleading error. I'm not running JRuby that's just the error given after being passed through GlimmerBlocker (must be Java based). With GlimmerBlocker turned off the error Chrome throws is:

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

Looked like something was failing so I tried running in debug mode and found it gives the following error:

!! Unexpected error while processing request: "\xA0" from ASCII-8BIT to UTF-8
"\xA0" from ASCII-8BIT to UTF-8
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/rendering.rb:20:in `encode'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/rendering.rb:20:in `to_html'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/markdown.rb:38:in `evaluate'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/markdown.rb:61:in `evaluate'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-render-0.3.7/lib/renee_render.rb:165:in `render_setup'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-render-0.3.7/lib/renee_render.rb:76:in `render'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/server.rb:106:in `block (3 levels) in start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/routing.rb:271:in `block in complex_variable'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/routing.rb:312:in `with_path_part'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/routing.rb:269:in `complex_variable'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/routing.rb:71:in `variable'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/chaining.rb:51:in `var'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/server.rb:65:in `block (2 levels) in start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/request_context.rb:16:in `instance_eval'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/request_context.rb:16:in `block in call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/request_context.rb:14:in `catch'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core/request_context.rb:14:in `call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/renee-core-0.3.7/lib/renee_core.rb:38:in `call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:in `call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/static.rb:53:in `call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run_machine'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/manager.rb:34:in `start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs.rb:26:in `start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/lib/gitdocs/cli.rb:18:in `start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/gitdocs-0.4.11/bin/gitdocs:5:in `<top (required)>'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/bin/gitdocs:19:in `load'
    /Users/Chris/.rvm/rubies/ruby-1.9.2-p290/bin/gitdocs:19:in `<main>'

Encoding issues?

from gitdocs.

nesquena avatar nesquena commented on June 17, 2024

Can you gist us the file and/or email it to me? The file must contain an unencodable character somehow. I don't think it has much to do with the fact its been renamed.

Is there any non-utf8 character in the document. I find an encoding error (as we encode in utf8) sort of odd for a markdown doc.

from gitdocs.

chriskempson avatar chriskempson commented on June 17, 2024

Yeah, when saw the encoding error I started thinking the same thing. You were right, was nothing to do with renaming, just a coincidence. I managed to find the offending character. If you download this gist [https://gist.github.com/1567712] you should be able the recreate the error.

Interestingly I just tried throwing some Japanese one of my markdown files and got the same error.

from gitdocs.

nesquena avatar nesquena commented on June 17, 2024

@chriskempson I pushed some changes, can you pull down and run gitdocs from source and confirm this fixes the issue?

from gitdocs.

chriskempson avatar chriskempson commented on June 17, 2024

Just tested your changes. Works wonderfully, thanks very much!

My Japanese text didn't cause trouble anymore but my browser wasn't picking up the UTF-8 encoding so added the proper meta tag and just submitted it as a pull request.

from gitdocs.

nesquena avatar nesquena commented on June 17, 2024

Cool pulled in your request and released a new gem. Looks like it fixes everything. Thanks!

from gitdocs.

chriskempson avatar chriskempson commented on June 17, 2024

Thats really great. Thanks a lot.

from gitdocs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.