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

Error: bad URI(is not URI?): http://localhost:4000 #50

Open
evertonfraga opened this issue Mar 12, 2020 · 7 comments
Open

Error: bad URI(is not URI?): http://localhost:4000 #50

evertonfraga opened this issue Mar 12, 2020 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@evertonfraga
Copy link

I get this while trying to run it locally.

Any clues? I am using jekyll-target-blank 2.0.0 and jekyll 3.8.5.

@keithmifsud keithmifsud self-assigned this Mar 14, 2020
@keithmifsud keithmifsud added the question Further information is requested label Mar 14, 2020
@keithmifsud
Copy link
Owner

Hi @evertonfraga

Thank you for your question. I don't think this is an issue with the plugin but an issue with your specific setup.

I would need more details in order to help you.

@csculley
Copy link

Just ran into a similar bug where I didn't have url specified in my _config.yml at all.
I don't know much about ruby, but in my case it seemed like the bug occurred on line 195 of jekyll-target-blank.rb when it tried to use @site_url and it was null. However, explicitly adding url to my _config.yml fixed it. In your case, using your final URL instead of localhost in your _config.yml might work.

@keithmifsud
Copy link
Owner

Yepp...thank you @csculley that all make sense.

@evertonfraga
Copy link
Author

@csculley that wasn't my case, as I did have @site_url set, and even tried some combinations of local/remote URLs.

I will debug further this week.

@juanfrans
Copy link

Hi, I'm getting the same error. Here's the output:

Traceback (most recent call last):
	54: from /Users/juanfrans/.gem/ruby/2.7.0/bin/bundle:23:in `<main>'
	53: from /Users/juanfrans/.gem/ruby/2.7.0/bin/bundle:23:in `load'
	52: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
	51: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
	50: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
	49: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
	48: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
	47: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
	46: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
	45: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	44: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	43: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
	42: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
	41: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
	40: from /Users/juanfrans/.gem/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
	39: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `<top (required)>'
	38: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `load'
	37: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
	36: from /Users/juanfrans/.gem/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	35: from /Users/juanfrans/.gem/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	34: from /Users/juanfrans/.gem/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	33: from /Users/juanfrans/.gem/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	32: from /Users/juanfrans/.gem/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	31: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	30: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
	29: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
	28: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
	27: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
	26: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
	25: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
	24: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:76:in `process'
	23: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:201:in `render'
	22: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:507:in `render_docs'
	21: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:507:in `each_value'
	20: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:508:in `block in render_docs'
	19: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:508:in `each'
	18: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:509:in `block (2 levels) in render_docs'
	17: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:524:in `render_regenerated'
	16: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:381:in `trigger_hooks'
	15: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:101:in `trigger'
	14: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:101:in `each'
	13: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:102:in `block in trigger'
	12: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:335:in `block in <top (required)>'
	11: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:35:in `process'
	10: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:65:in `process_html'
	 9: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:77:in `process_anchor_tags'
	 8: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set.rb:237:in `each'
	 7: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set.rb:237:in `upto'
	 6: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set.rb:238:in `block in each'
	 5: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:78:in `block in process_anchor_tags'
	 4: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:92:in `processable_link?'
	 3: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:196:in `external?'
	 2: from /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/uri/common.rb:234:in `parse'
	 1: from /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/uri/rfc3986_parser.rb:73:in `parse'
/usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "(https://data.census.gov)" (URI::InvalidURIError)

I'm running jekyll-target-blank 2.0.0 and jekyll 4.0.0

I also have a url specified in my _config.yml file.

Thanks!

@jgarofoli
Copy link

I had this issue, it may help it the README.md mentions that setting the url in _config.yml is required. Thanks!

@pmonjo
Copy link

pmonjo commented Aug 29, 2020

I am having the exact same issue:

[--- SNIP ---]
	13: from /home/pmonjo/.gems/gems/jekyll-4.1.1/lib/jekyll/hooks.rb:99:in `block in trigger'
	12: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:335:in `block in <top (required)>'
	11: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:35:in `process'
	10: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:65:in `process_html'
	 9: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:77:in `process_anchor_tags'
	 8: from /home/pmonjo/.gems/gems/nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:237:in `each'
	 7: from /home/pmonjo/.gems/gems/nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:237:in `upto'
	 6: from /home/pmonjo/.gems/gems/nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:238:in `block in each'
	 5: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:78:in `block in process_anchor_tags'
	 4: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:92:in `processable_link?'
	 3: from /home/pmonjo/.gems/gems/jekyll-target-blank-2.0.0/lib/jekyll-target-blank.rb:196:in `external?'
	 2: from /usr/lib/ruby/2.5.0/uri/common.rb:237:in `parse'
	 1: from /usr/lib/ruby/2.5.0/uri/rfc3986_parser.rb:73:in `parse'
/usr/lib/ruby/2.5.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?):  https://blogs.adobe.com/digitalmarketing/ (URI::InvalidURIError)

The URL is totally correct (https://blogs.adobe.com/digitalmarketing/), but the RFC3986 parser claims it's a bad URI. This error does not happen when removing the plugin.

I really want to use this plugin, as it does exactly what I am looking for. Any clues why this is happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants