wrightling / scripture_lookup

Ruby gem that provides a clean interface to scripture providers (Crossways ESV, Bible Gateway).
MIT License
7 stars 3 forks source link

Not working after fresh install #2

Closed jgclark closed 10 years ago

jgclark commented 10 years ago

I've just found this -- just what I was looking for. Unfortunately, it doesn't work with the search terms shown in your example. Error is

$ scripture "Rom 12:1-2", NIV
/Library/Ruby/Gems/2.0.0/gems/scripture_lookup-0.0.2/lib/scripture_lookup/bible_gateway_scraper.rb:27:in `rescue in lookup': private method `document' called for #<MetaInspector::Parser:0x007fd1c1154920> (ScriptureLookup::Error)
    from /Library/Ruby/Gems/2.0.0/gems/scripture_lookup-0.0.2/lib/scripture_lookup/bible_gateway_scraper.rb:19:in `lookup'
    from /Library/Ruby/Gems/2.0.0/gems/scripture_lookup-0.0.2/bin/scripture:10:in `<top (required)>'
    from /usr/bin/scripture:23:in `load'
    from /usr/bin/scripture:23:in `<main>'
wrightling commented 10 years ago

Hi there,

What ruby version are you running under (looks like mri ruby 2.0.0 from your backtrace)? What version of MetaInspector is installed (gem list metainspector)?

My tests are green and the CLI is working for the example you gave under MRI 2.0.0-p247, with Metainspector 1.15.1, but an "it works for me" answer isn't helpful =)

Let me know and I'll try your specific versions locally. Just playing around I already see there is now an issue under Jruby 1.7.5 that I need to investigate.

Warren //// @wrightling

jgclark commented 10 years ago

Thanks for the very quick reply, Warren!

The two versions are:

ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] metainspector (1.17.0)

— Jonathan

On Saturday, 2 November 2013 at 14:14, Warren Wright wrote:

Hi there, What ruby version are you running under (looks like mri ruby 2.0.0 from your backtrace)? What version of MetaInspector is installed (gem list metainspector)? My tests are green and the CLI is working for the example you gave under MRI 2.0.0-p247, with Metainspector 1.15.1, but an "it works for me" answer isn't helpful =) Let me know and I'll try your specific versions locally. Just playing around I already see there is now an issue under Jruby 1.7.5 that I need to investigate. Warren //// @wrightling (https://github.com/wrightling)

— Reply to this email directly or view it on GitHub (https://github.com/wrightling/scripture_lookup/issues/2#issuecomment-27622769).

wrightling commented 10 years ago

I can say at the very least that I should be using pessimistic versioning to limit which versions of my dependencies are being picked up (i.e. metainspector). I'll see if I can't make it work with the new metainspector version or modify/update the gemspec to depend on 1.15.1 if not.

wrightling commented 10 years ago

The breaking change was in 1.17 of metainspector. Between 1.16 and 1.17 they updated their API to make #document private and instead require #to_s.

For now, updating scripture_lookup to use pessimistic versioning and keep us back at 1.15 of metainspector. Will finish testing and update the gem sometime today I hope (after soccer game + soccer party + softball party : #kids).

wrightling commented 10 years ago

Version 0.0.3 is in the wild and should resolve this issue for you. Please note that I resolved this with pessimistic version constraints, so it should no longer rely on the latest versions of metainspector (which contained breaking API changes).

jgclark commented 10 years ago

Many thanks for the quick fix. — Jonathan

On Monday, 4 November 2013 at 00:49, Warren Wright wrote:

Version 0.0.3 is in the wild and should resolve this issue for you. Please note that I resolved this with pessimistic version constraints, so it should no longer rely on the latest versions of metainspector (which contained breaking API changes).

— Reply to this email directly or view it on GitHub (https://github.com/wrightling/scripture_lookup/issues/2#issuecomment-27659511).