Git Product home page Git Product logo

Comments (19)

drbrain avatar drbrain commented on September 28, 2024

Can you include a backtrace or a place where I can download the source and the steps to reproduce?

from rdoc.

pedz avatar pedz commented on September 28, 2024

This is done via "rake app:doc --trace"

error generating /Users/pedzan/Source/Rails/raptor/doc/app/app/controllers/application_controller_rb.html: code converter not found (UTF8-MAC to US-ASCII) (Encoding::ConverterNotFoundError)
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/template/darkfish/filepage.rhtml:9:in `write'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/template/darkfish/filepage.rhtml:9:in `block (2 levels) in generate_file_files'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/erb.rb:753:in `eval'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/erb.rb:753:in `result'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:366:in `template_result'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:347:in `block in render_template'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/pathname.rb:831:in `open'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/pathname.rb:831:in `open'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:342:in `render_template'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:265:in `block in generate_file_files'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:258:in `each'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:258:in `generate_file_files'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/generator/darkfish.rb:163:in `generate'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/rdoc.rb:450:in `block in document'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/rdoc.rb:442:in `chdir'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rdoc-3.5.3/lib/rdoc/rdoc.rb:442:in `document'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake/rdoctask.rb:140:in `block in define'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.1-p378@raptor/bin/rake:19:in `<main>'

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

Do you have the source necessary to reproduce this? I can't reproduce it from the backtrace alone.

from rdoc.

pedz avatar pedz commented on September 28, 2024

Let me try and create a small testcase. I don't want to post my whole app unless I really have to.

On May 13, 2011, at 6:13 PM, drbrain wrote:

Do you have the source necessary to reproduce this? I can't reproduce it from the backtrace alone.

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#comment_1157976

from rdoc.

pedz avatar pedz commented on September 28, 2024

https://github.com/pedz/rdoc-test

Hopefully, you can pull it down and do:

rake doc:app

and hit the problem. I put a defaults.gems in the project too. That is the result of "rvm gemset export". You can use that to match up my gem environment.

Good luck,
pedz

On May 13, 2011, at 6:13 PM, drbrain wrote:

Do you have the source necessary to reproduce this? I can't reproduce it from the backtrace alone.

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#comment_1157976

from rdoc.

pedz avatar pedz commented on September 28, 2024

Hi,

This may be a separate issue (and I suppose it might not be an rdoc issue at all). When I do:

gem rdoc --all --overwrite

the ri for ActionController is skipped. I get these messages:

Installing ri documentation for actionmailer-2.3.5...
Installing ri documentation for actionpack-2.3.5...
unable to convert "\xC2" from ASCII-8BIT to UTF-8 in conversion from ASCII-8BIT to US-ASCII for lib/action_controller/base.rb, skipping
unable to convert "\xE2" from ASCII-8BIT to UTF-8 in conversion from ASCII-8BIT to US-ASCII for lib/action_view/helpers/form_options_helper.rb, skipping
...

from rdoc.

pedz avatar pedz commented on September 28, 2024

Hey, this might be key. I have:

LANG=en_US.UTF-8

set in my environment. The errors above I mostly got rid off because as root, (which I become when I do the gem rdoc command), it was not set. Once I set it in root's environment, that fixed most of those "unable to convert" errors.

Hope this helps...

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

Yes, switching LANG would fix these errors. rdoc defaults its output format based on what your LANG is set to.

Unfortunately I can't reproduce this with the LANG=C (US-ASCII or LANG= when running rdoc against your app.

The "unable to convert" errors you see are due to files that are not tagged as UTF-8 in actionpack, they're safe to ignore.

Since you were able to work around this by setting LANG I will close this issue.

from rdoc.

pedz avatar pedz commented on September 28, 2024

I posted to you too soon. Changing LANG turns out not to solve the issue.

On Jun 7, 2011, at 11:03 PM, drbrain wrote:

Yes, switching LANG would fix these errors. rdoc defaults its output format based on what your LANG is set to.

Unfortunately I can't reproduce this with the LANG=C (US-ASCII or LANG= when running rdoc against your app.

The "unable to convert" errors you see are due to files that are not tagged as UTF-8 in actionpack, they're safe to ignore.

Since you were able to work around this by setting LANG I will close this issue.

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#comment_1324394

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

Converting from UTF8-MAC to US-ASCII will probably be impossible without performing some transcoding. However, your output encoding should not be set to US-ASCII if your LANG is UTF-8 (which you have) or you've provided a --encoding (which you haven't, but shouldn't need to).

Unfortunately I've been unable to reproduce this issue so far. I'll try to revisit it later to see how I can make some UTF-8MAC strings.

from rdoc.

pedz avatar pedz commented on September 28, 2024

How do I change / set my output encoding? I believe I looked for that but didn't find a way to change it.

On Jun 8, 2011, at 7:38 PM, drbrain wrote:

Converting from UTF8-MAC to US-ASCII will probably be impossible without performing some transcoding. However, your output encoding should not be set to US-ASCII if your LANG is UTF-8 (which you have) or you've provided a --encoding (which you haven't, but shouldn't need to).

Unfortunately I've been unable to reproduce this issue so far. I'll try to revisit it later to see how I can make some UTF-8MAC strings.

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#comment_1331125

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

Use --encoding to set the output encoding:

rdoc --encoding UTF-8 …

This defaults to whatever $LANG is set to. I'm still not quite certain where your UTF8-MAC encoding is coming from. I think it's a filesystem encoding but I'm not sure. (This is extra frustrating because I too have a Mac.)

from rdoc.

pedz avatar pedz commented on September 28, 2024

Hey,

I'm pretty sure the key is Ruby 1.9.1. Were you testing on that level?

I created a new gemset using Ruby 1.9.2. (I was using Ruby 1.9.1-p378). This solves the problem. I bumped into a json_pure problem yesterday with 1.9.1. I'm going to move up to 1.9.2 "soon". (Thats been that way for months now :-).

If you grep the 1.9.1 ruby source for utf8-mac, you find some hits. I've grep'ed all my source code and environment and I don't find it. So it must be some weirdness / bug with Ruby 1.9.1.

In fact, the 1.9.2 enc/trans directory has three files named utf8_mac*

If you can't recreate it using Ruby 1.9.1, I'd leave it closed. If you can, you might find it is not practical to fix. How many people are still working from 1.9.1? (Although, they do seem to be making updates to it.)

I appreciate all the time you put into this.

pedz

On Jun 10, 2011, at 1:07 PM, drbrain wrote:

Use --encoding to set the output encoding:

rdoc --encoding UTF-8 …

This defaults to whatever $LANG is set to. I'm still not quite certain where your UTF8-MAC encoding is coming from. I think it's a filesystem encoding but I'm not sure. (This is extra frustrating because I too have a Mac.)

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#issuecomment-1344044

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

I do primary development on ruby trunk and run unit tests on ruby 1.8.7 (apple and p330), 1.9.1-p378, 1.9.2-p136, 1.9.2-p180.

I'll try to reproduce using 1.9.1-p378.

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

I found the problem, working on a fix.

from rdoc.

pedz avatar pedz commented on September 28, 2024

Wee!!! I hope this isn't interfering with your plan to take over the world? :-)

On Jun 10, 2011, at 5:21 PM, drbrain wrote:

I found the problem, working on a fix.

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#issuecomment-1345391

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

Fixed!

from rdoc.

pedz avatar pedz commented on September 28, 2024

So, how do I get this? Pull down your git repo and install from that?

On Jun 10, 2011, at 5:33 PM, drbrain wrote:

Fixed!

Reply to this email directly or view it on GitHub:
https://github.com/rdoc/rdoc/issues/33#issuecomment-1345454

from rdoc.

drbrain avatar drbrain commented on September 28, 2024

rake install_gem will install

If you are patient I should have a release out early next week, I'm working on Issue #21.

from rdoc.

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.