molybdenum-99 / reality

Comprehensive data proxy to knowledge about real world
MIT License
817 stars 43 forks source link

Ruby version issues #38

Closed ThunderHeavyIndustries closed 8 years ago

ThunderHeavyIndustries commented 8 years ago

I've tried using this with ruby 1.9.3-p327, and ruby 2.0.0-p247 to no avail. It seems to work beautifully for ruby 2.1.2 and up.

Trying to run the first sample page results in the following error:

/Users/drthunder/.rvm/gems/ruby-1.9.3-p327/gems/mediawiktory-0.0.2/lib/mediawiktory.rb:7:in `require_relative': /Users/drthunder/.rvm/gems/ruby-1.9.3-p327/gems/mediawiktory-0.0.2/lib/mediawiktory/client.rb:21: syntax error, unexpected tPOW (SyntaxError) def initialize(url, **options)

I recognize that the issue here is with mediawikitory, but since you're also responsible for mediawikitory and I'm encountering it by way of using the reality gem i thought I'd submit the issue here to give a greater context. The gem page says no minimum ruby version, but it seems like there might be some issues with older versions.

Thoughts?

zverok commented 8 years ago

1.9.3 is not supported intentionally (it is keyword arguments feature I am fond of and use in all of my new gems, which 1.9.3 can't understand). I should note it explicitly in README.

The same thing with 2.0.x because of refinements (used instead of core extensions). Refinements should work since 2.0, but looks like they are not. I'll investigate the matter (but with my RVM's ruby-2.0.0-p598 it's as bad as "undefined method `using'", so, I'd not expect much of soultuion here).

ThunderHeavyIndustries commented 8 years ago

Suspicions confirmed then. Thanks for the feedback. You might note this in the minimum version info for the gem so that it's reflected on the rubygems page.

zverok commented 8 years ago

Yep, my bad. Will do!