Giter Site home page Giter Site logo

Comments (12)

antstorm avatar antstorm commented on June 20, 2024

@bovender sure, but it needs to be ruby version dependent, since Nokogiri 1.7 also dropped support for older rubies

from eu_central_bank.

bovender avatar bovender commented on June 20, 2024

Ah ok, sure. Unfortunately I'm unable to help with that -- don't know enough about Gemspec dependencies.

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

No problem, I'll add this one

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

#55

from eu_central_bank.

bovender avatar bovender commented on June 20, 2024

May I ask one more thing -- the ruby version-dependent dependency somehow does not work:

$ bundle update
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "nokogiri":
  In Gemfile:
    nokogiri (~> 1.7.0)

    eu_central_bank (~> 1.0) was resolved to 1.0.0, which depends on
      nokogiri (~> 1.6.3)
$ irb
irb(main):001:0> puts RUBY_VERSION
2.4.0
=> nil
irb(main):002:0> 

The RUBY_VERSION is 2.4.0, but the nokogiri dependency is not properly resolved.

Maybe this is not the right place to ask this, but maybe I'm just missing something simple.

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

So it says that eu_central_bank got resolved to 1.0.0, which is an older version. You want 1.1.0 for ruby 2.4.0 support.

from eu_central_bank.

bovender avatar bovender commented on June 20, 2024

I really don't mean to be a nuisance, but the output is the same when I fix the version at 1.1.0 in the Gemfile. When I download the gem from RubyGems.org and extract the files, the metadata file contained in metadata.gz does not mention nokogiri 1.7.0:

    --- !ruby/object:Gem::Specification
    name: eu_central_bank
    version: !ruby/object:Gem::Version
      version: 1.1.0
    platform: ruby
    authors:
    - Shane Emmons
    autorequire: 
    bindir: bin
    cert_chain: []
    date: 2017-01-19 00:00:00.000000000 Z
    dependencies:
    - !ruby/object:Gem::Dependency
      name: nokogiri
      requirement: !ruby/object:Gem::Requirement
        requirements:
        - - ~>
          - !ruby/object:Gem::Version
            version: 1.6.3
      type: :runtime
      prerelease: false
      version_requirements: !ruby/object:Gem::Requirement
        requirements:
        - - ~>
          - !ruby/object:Gem::Version
            version: 1.6.3
      [...]

When I clone the repository and build the gem myself using Ruby 2.4.0, I find this inside the metadata file:

    --- !ruby/object:Gem::Specification
    name: eu_central_bank
    version: !ruby/object:Gem::Version
      version: 1.1.0
    platform: ruby
    authors:
    - Shane Emmons
    autorequire: 
    bindir: bin
    cert_chain: []
    date: 2017-01-25 00:00:00.000000000 Z
    dependencies:
    - !ruby/object:Gem::Dependency
      name: nokogiri
      requirement: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: 1.7.0
      type: :runtime
      prerelease: false
      version_requirements: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: 1.7.0
      [...]

Which makes me wonder if the RUBY_VERSION switch is really resolved at installation time, rather than packaging time.

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

@bovender sounds like you're right… and a quick search revealed the fact that it might be impossible to achieve. So it seems like we need to relax the dependency on the gem ('>= 1.6.3', '< 2.0'), allowing devs to pick the right one in their Gemfiles.

from eu_central_bank.

ahukkanen avatar ahukkanen commented on June 20, 2024

@antstorm Maybe just put it to readme that if you're using older Ruby < 2.4.0, use X version of this gem?

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

@ahukkanen it would make sense to drop the support of Ruby <= 2.0, yes, since it's what causing most of the issues right now. I wonder how many people are still running older rubies…

from eu_central_bank.

ahukkanen avatar ahukkanen commented on June 20, 2024

Yeah, that's true, too. I would guess not that many people.

from eu_central_bank.

antstorm avatar antstorm commented on June 20, 2024

I guess it's time to do that :)

from eu_central_bank.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.