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

Better error notification on missing linguist dependency? #36

Closed
gjtorikian opened this issue Feb 6, 2013 · 5 comments · Fixed by #37
Closed

Better error notification on missing linguist dependency? #36

gjtorikian opened this issue Feb 6, 2013 · 5 comments · Fixed by #37

Comments

@gjtorikian
Copy link
Owner

Chalk this up to RTFM, but with a simple filter like this

HTML::Pipeline.new [
          HTML::Pipeline::MarkdownFilter,
          HTML::Pipeline::SyntaxHighlightFilter
        ]

I kept getting the help rails app to crash:

SystemExit in Help/articles#show

Showing /Users/garentorikian/github/help/app/views/help/articles/_article.html.erb where line #22 raised:

exit
Extracted source (around line #22):

Finally, after looking at the logs, I found: You need to install linguist before using the SyntaxHighlightFilter. See README.md for details.

Not sure if this error can be raised in the browser itself, but it'd be nice. Also not sure if this'll be fixed by #28 anyway.

@jch
Copy link
Contributor

jch commented Feb 6, 2013

Sucks that the error message was cryptic from your log 😦

Even though it's a gem full of html utilities, this gem doesn't make any assumption about where you're using it. The best we can do is print the error message to stderr.

@jch jch closed this as completed Feb 6, 2013
@gjtorikian
Copy link
Owner Author

What about replacing $stderr.puts with a Raise?

This is what text_filter.rb does, and because of it, I could see its error on the browser/app.

@jch jch reopened this Feb 7, 2013
@jch
Copy link
Contributor

jch commented Feb 7, 2013

That sounds good to me. Brain fart on my part for not thinking of that. Do you want to send a PR my way for that? I'll bump the gem version after merging that.

@gjtorikian
Copy link
Owner Author

Sure, gimme a minute.

On Wed, Feb 6, 2013 at 5:13 PM, Jerry Cheung [email protected]:

That sounds good to me. Brain fart on my part for not thinking of that. Do
you want to send a PR my way for that? I'll bump the gem version after
merging that.


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-13216080.

@jch
Copy link
Contributor

jch commented Feb 7, 2013

Thanks for the speedy pull! I've released 0.0.8 with your changes http://rubygems.org/gems/html-pipeline/versions/0.0.8

@jch jch closed this as completed Feb 7, 2013
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

Successfully merging a pull request may close this issue.

2 participants