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

Internal links checker throwing exception #1423

Closed
iay opened this issue Apr 29, 2019 · 6 comments
Closed

Internal links checker throwing exception #1423

iay opened this issue Apr 29, 2019 · 6 comments

Comments

@iay
Copy link
Contributor

iay commented Apr 29, 2019

Steps to reproduce

  1. start with my working site
  2. bundle update nanoc (to get 11.4.4)
  3. bundle exec nanoc check internal_links

Expected behavior

All is well.

Actual behavior

Loading site… done
  Running check internal_links…   
Captain! We’ve been hit!

NoMethodError: undefined method `green' for "ok":String

  0. /Volumes/Cased/git/iay/iay/site/vendor/ruby/2.4.0/gems/nanoc-4.11.4/lib/nanoc/checking/runner.rb:109:in `block in run_checks'

Details

The line in question is:

        puts check.issues.empty? ? 'ok'.green : 'error'.red

I note that elsewhere in runner.rb there's a require 'colored' but I don't seem to have that available. Missing dependency perhaps?

@denisdefreyne
Copy link
Member

colored was a dependency of cri, which is a dependency of nanoc. I removed colored as a dependency from cri, but did not realise that Nanoc uses colored indirectly.

I will add colored as an explicit dependency to nanoc.

@denisdefreyne
Copy link
Member

(Unfortunately, these kinds of problems are bound to happen because that is the way Ruby works.)

@denisdefreyne
Copy link
Member

Fixed by 3008036.

@denisdefreyne
Copy link
Member

(You could also downgrade cri as a workaround.)

@iay
Copy link
Contributor Author

iay commented Apr 29, 2019

Confirming that the change you pushed works for me.

@denisdefreyne
Copy link
Member

This is now in the Nanoc 4.11.5 release.

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

No branches or pull requests

2 participants