square / fdoc

Documentation format and verification
Other
380 stars 59 forks source link

fdoc_to_html issues #13

Closed Emily closed 11 years ago

Emily commented 11 years ago

When running

fdoc_to_html ./docs/fdoc ./html

this happens:

/gems/fdoc-0.2.6/lib/fdoc/presenters/html_presenter.rb:38:in `render_json': undefined method     `pretty_generate' for JSON:Module (NoMethodError)
zachmargolis commented 11 years ago

Are you running it with bundle exec? You may have a different version of the json gem that does not have this method.

Emily commented 11 years ago

Yes to bundle exec. The bundled version of json is 1.7.5.

zachmargolis commented 11 years ago

What version of ruby are you using?

Emily commented 11 years ago

1.9.3-p194

zachmargolis commented 11 years ago

Ok, I'm running out of ideas.

Looks like #pretty_generate is part of the Ruby 1.9.3 standard library, what about removing JSON from the bundle and using the system version?

Emily commented 11 years ago

Seems to work just fine if I add a require 'json' in html_presenter which suggests to me that, at least in my environment, whatever mechanism is loading json for you isn't for me. Are you running a different ruby version than 1.9.3?

zachmargolis commented 11 years ago

I'm on 1.9.3-p0. But it sounds just like a missing require problem. Can you go ahead and make a pul request with that fix?

mariozaizar commented 11 years ago

Please update rubygems with this fix. Currente version 0.2.6 still don't have the require 'json' that fix this issue.

zachmargolis commented 11 years ago

@mariozaizar thanks for the reminder! Just pushed 0.2.7