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 install timetrap error #176

Closed
parasew opened this issue May 1, 2019 · 7 comments · Fixed by #186
Closed

gem install timetrap error #176

parasew opened this issue May 1, 2019 · 7 comments · Fixed by #186

Comments

@parasew
Copy link

parasew commented May 1, 2019

Parsing documentation for timetrap-1.15.1
Before reporting this, could you check that the file you're documenting
has proper syntax:

/Users/foob/.rvm/rubies/ruby-2.6.2/bin/ruby -c lib/Getopt/DelimScanner.rb

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

@JiProchazka
Copy link

JiProchazka commented May 8, 2019

Exactly the same here..
just with version 2.6.1

@JiProchazka
Copy link

It's a bug in RDoc. Don't know how to workaround though

@jostber
Copy link

jostber commented Jun 21, 2019

It's the same result with Ruby 2.6.3.

@jostber
Copy link

jostber commented Jun 26, 2019

This works though:

gem --no-document install timetrap

@andreskytt
Copy link

gem install -N timetrap in 3.0.3

@brarnaudovski
Copy link
Contributor

The problem comes from rdoc gem and it has a fix in version 6.2.0

Unfortunately this version comes as a default only in ruby 2.7

You can use @jostber 's solution (by using --no-rdoc option) or you can gem install rdoc which fill fetch the lates rdoc version.


My first suspicion was in the syntax of the lib/Getopt/DelimScanner.rb file. The error suggestion is:

Before reporting this, could you check that the file you're documenting
has proper syntax:

  /Users/branko/.rbenv/versions/2.6.5/bin/ruby -c lib/Getopt/DelimScanner.rb

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

But running ruby -c lib/Getopt/DelimScanner.rb doesn't report any errors:

~/projects/timetrap master
❯ ruby -c lib/Getopt/DelimScanner.rb
ruby: warning: shebang line ending with \r may cause problems
Syntax OK

@samg You may consider adding some info/instruction in the Readme file for this. I can make a PR if you are OK with it.

@categulario
Copy link
Collaborator

@brarnaudovski feel free to make a PR if you still think it's needed

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

Successfully merging a pull request may close this issue.

6 participants