picatz / whereisthis

🌎 A command-line application to help determine the location information from a given ip address or url.
MIT License
21 stars 1 forks source link

no implicit conversion of nil into String (TypeError) #1

Closed Thor77 closed 7 years ago

Thor77 commented 7 years ago

URL-Example from README doesn't work (no url does, to be honest)

>> whereisthis -w www.google.com
~/.gem/ruby/2.3.0/gems/whereisthis-1.0.5/lib/whereisthis.rb:67:in `+': no implicit conversion of nil into String (TypeError)
    from ~/.gem/ruby/2.3.0/gems/whereisthis-1.0.5/lib/whereisthis.rb:67:in `findout!'
    from ~/.gem/ruby/2.3.0/gems/whereisthis-1.0.5/bin/whereisthis:4:in `<top (required)>'
    from ~/.gem/ruby/2.3.0/bin/whereisthis:22:in `load'
    from ~/.gem/ruby/2.3.0/bin/whereisthis:22:in `<main>'
picatz commented 7 years ago

Thanks for catching that!

The url option was working if the option was passed in as the first argument -- there was an error in how I was setting the value in the option hash which lead to the API call that made up of the web service url and the ip that is set at the command-line or resolved when passed in as a url.

The -w option didn't set things up properly -- but I've now fixed that with the 1.2.0 version if you update.

Thanks!

image

Thor77 commented 7 years ago

Fixed, thanks 👍