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

WordPress websites: undefined method `search' for nil:NilClass (NoMethodError) #16

Closed
vatnoise opened this Issue Mar 1, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@vatnoise

vatnoise commented Mar 1, 2016

Hi,
I'm using Ruby Gems for the first time and might be just doing some newbie mistakes.
Am I right that I can use this get to test any website on the web?

I've tried to test a few websites and it seems that when it's a WordPress website it gives me an error:

/Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/lib/validate_website/crawl.rb:36:in `extract_imgs_from_page': undefined method `search' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/lib/validate_website/crawl.rb:63:in `block in on_every_html_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent/events.rb:233:in `block in every_html_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:637:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:637:in `block (2 levels) in visit_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:637:in `each'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:637:in `block in visit_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:573:in `block in get_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:739:in `prepare_request'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:567:in `get_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:633:in `visit_page'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:297:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:279:in `start_at'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/agent.rb:229:in `site'
from /Library/Ruby/Gems/2.0.0/gems/spidr-0.5.0/lib/spidr/spidr.rb:120:in `site'
from /Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/lib/validate_website/crawl.rb:44:in `spidr_crawler'
from /Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/lib/validate_website/crawl.rb:21:in `crawl'
from /Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/lib/validate_website/runner.rb:16:in `run_crawl'
from /Library/Ruby/Gems/2.0.0/gems/validate-website-1.5.4/bin/validate-website:5:in `<top (required)>'
from /usr/local/bin/validate-website:23:in `load'
from /usr/local/bin/validate-website:23:in `<main>'
@vatnoise

This comment has been minimized.

vatnoise commented Mar 1, 2016

Even

validate-website -s "http://wordpress.org"

gives this error

@spk

This comment has been minimized.

Owner

spk commented Mar 1, 2016

Hi @vatnoise, yes this gem is not only for Ruby websites it should work for any website in The Internet :trollface:
I will take a look on this and keep you informed.

@spk spk self-assigned this Mar 1, 2016

spk added a commit that referenced this issue Mar 2, 2016

@spk spk closed this in 54f574a Mar 2, 2016

@spk

This comment has been minimized.

Owner

spk commented Mar 2, 2016

Released in validate-website (1.5.6)

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