Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention Ruby version in Readme #59

Open
vkotovv opened this issue Jul 23, 2014 · 3 comments
Open

Mention Ruby version in Readme #59

vkotovv opened this issue Jul 23, 2014 · 3 comments

Comments

@vkotovv
Copy link
Contributor

vkotovv commented Jul 23, 2014

We tried to run fdoc on a machine with Ruby 2.0 and it failed with the following stack trace. Then it worked with Ruby 1.8.7 installed. Maybe it should be explicitly stated that you should use Ruby < 2.0 to run fdoc.

(erb):46:in `concat': incompatible character encodings: UTF-8 and US-ASCII (Encoding::CompatibilityError)
from (erb):46:in `get_binding'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval'
from /System/Library/Fram
eworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/presenters/base_presenter.rb:23:in `render_erb'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/presenters/endpoint_presenter.rb:12:in `to_html'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:58:in `block (4 levels) in convert_to_html'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:57:in `each'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:57:in `block (3 levels) in convert_to_html'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:56:in `each'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:56:in `block (2 levels) in convert_to_html'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in `block in inside'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:125:in `chdir'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:125:in `cd'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in `inside'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:85:in `inside_service_presenter'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:53:in `block in convert_to_html'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:52:in `each'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:52:in `convert_to_html'
    from /Users/tralfamadore/Sources/fdoc/lib/fdoc/cli.rb:41:in `convert'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from fdoc/bin/fdoc:9:in `<main>'
@zachmargolis
Copy link
Collaborator

I wouldn't go as far as requiring 1.8.7, I run fdoc in 1.9.3 all the time, have not hit this issue.

Maybe we're missing some encoding comments or something. Do you have a small version of your .fdoc files that can help reproduce this error?

@vkotovv vkotovv closed this as completed Jul 24, 2014
@vkotovv vkotovv reopened this Jul 24, 2014
vkotovv added a commit to vkotovv/fdoc that referenced this issue Jul 24, 2014
@vkotovv
Copy link
Contributor Author

vkotovv commented Jul 24, 2014

You can find small sample in this commit. I just checked, it works with Ruby 1.8.7, but is not working with 2.0.

@vkotovv
Copy link
Contributor Author

vkotovv commented Jul 24, 2014

Also, you can take a look at this merged pull request. Because the content of the sample is in Russian, maybe its not just a matter of changing charset for template files in Ruby >= 2.0. I'm not a Ruby expert though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants