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

gemでインストールするとドキュメント生成時にエラーとなる #290

Closed
machu opened this issue May 7, 2013 · 8 comments
Assignees
Milestone

Comments

@machu
Copy link
Member

machu commented May 7, 2013

gem本体のインストールは成功している。

$ gem install tdiary
Successfully installed tdiary-3.2.2.20130507
Parsing documentation for tdiary-3.2.2.20130507
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /Users/machu/.rbenv/versions/2.0.0-p0/bin/ruby -c ChangeLog

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NoMethodError) undefined method `<' for nil:NilClass

ERROR:  While executing gem ... (NoMethodError)
    undefined method `<' for nil:NilClass
@ghost ghost assigned machu May 7, 2013
@machu
Copy link
Member Author

machu commented May 11, 2013

ruby 2.0.0でrdocがChangeLogの解析に失敗しているのが原因。ruby 1.9.3ではエラーは発生せず。

ruby 2.0.0

$ ruby --version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]
$ rdoc --version
rdoc 4.0.0
$ rdoc ChangeLog -o rdoc --debug
Parsing sources...
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /Users/machu/.rbenv/versions/2.0.0-p0/bin/ruby -c ChangeLog

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NoMethodError) undefined method `<' for nil:NilClass

/Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:199:in `apply_offset'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:259:in `make_time'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:331:in `parse'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:149:in `rescue in block in parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:143:in `block in parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:134:in `each_line'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:134:in `parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:183:in `scan'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:364:in `parse_file'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:417:in `block in parse_files'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:415:in `map'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:415:in `parse_files'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:485:in `document'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rdoc-4.0.0/bin/rdoc:20:in `<top (required)>'
        /Users/machu/.rbenv/versions/2.0.0-p0/bin/rdoc:23:in `load'
        /Users/machu/.rbenv/versions/2.0.0-p0/bin/rdoc:23:in `<main>'
undefined method `<' for nil:NilClass
/Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:199:in `apply_offset'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:259:in `make_time'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/time.rb:331:in `parse'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:149:in `rescue in block in parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:143:in `block in parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:134:in `each_line'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:134:in `parse_entries'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/parser/changelog.rb:183:in `scan'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:364:in `parse_file'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:417:in `block in parse_files'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:415:in `map'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:415:in `parse_files'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rdoc/rdoc.rb:485:in `document'
        /Users/machu/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rdoc-4.0.0/bin/rdoc:20:in `<top (required)>'
        /Users/machu/.rbenv/versions/2.0.0-p0/bin/rdoc:23:in `load'
        /Users/machu/.rbenv/versions/2.0.0-p0/bin/rdoc:23:in `<main>'

ruby 1.9.3

$ ruby --version
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1]
[[email protected]] $ ruby --version
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1]
[[email protected]] $ rdoc --version
rdoc 3.12.1

$ rdoc ChangeLog -o rdoc
Parsing sources...
100% [ 1/ 1]  ChangeLog

Generating Darkfish format into /Users/machu/work/tdiary/tdiary-core/rdoc...

Files:      1

Classes:    0 (0 undocumented)
Modules:    0 (0 undocumented)
Constants:  0 (0 undocumented)
Attributes: 0 (0 undocumented)
Methods:    0 (0 undocumented)

Total:      0 (0 undocumented)
  0.00% documented

Elapsed: 0.7s

@machu
Copy link
Member Author

machu commented May 11, 2013

類似事例あり。rdoc側に報告したほうがいいのだろうか。

https://github.com/rdoc/rdoc/issues/165

@hsbt
Copy link
Member

hsbt commented May 11, 2013

rdoc が core 同梱のものかどうかで別れますね...

@machu
Copy link
Member Author

machu commented May 11, 2013

rbenv環境ですが、rdocの実体はgemですね。

$ rbenv which rdoc
/Users/machu/.rbenv/versions/2.0.0-p0/bin/rdoc
$ ~/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rdoc-4.0.0/bin/rdoc --version
rdoc 4.0.0

@hsbt
Copy link
Member

hsbt commented Jul 15, 2013

@machu 2.0.0p247 + rdoc の最新バージョンでも発生するか確認できます?

@machu
Copy link
Member Author

machu commented Jul 15, 2013

はい。まだ再現します。

@hsbt
Copy link
Member

hsbt commented Jul 22, 2013

これは rdoc か ruby 本体のバグ報告ですねえ。

@tdtds tdtds modified the milestones: 4.0.4, 4.0.3 Mar 2, 2014
@tdtds tdtds modified the milestones: 4.0.5, 4.0.4 May 29, 2014
@hsbt
Copy link
Member

hsbt commented Aug 19, 2014

ruby 2.2.0dev (2014-08-18 trunk 47214) [x86_64-darwin14], rdoc-4.1.1 の環境では発生しませんでした

@hsbt hsbt closed this as completed Aug 19, 2014
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

3 participants