Skip to content
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

Ruby: failed to require gherkin/parser #483

Closed
kamaradclimber opened this issue Sep 24, 2018 · 4 comments
Closed

Ruby: failed to require gherkin/parser #483

kamaradclimber opened this issue Sep 24, 2018 · 4 comments

Comments

@kamaradclimber
Copy link

In general: version 3.2.0 of cucumber is incompatible with 6.0.10 of gherkin.

Summary

When using latest version of cucumber and gherkin gem, we get:

LoadError: cannot load such file -- gherkin/parser

Easy reproduction (with foodcritic command):

gem install --user foodcritic
foodcritic .

Full output:

LoadError: cannot load such file -- gherkin/parser
  /home/g_seux/.gem/ruby/2.5.0/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `require'
  /home/g_seux/.gem/ruby/2.5.0/gems/cucumber-core-3.2.0/lib/cucumber/core/gherkin/parser.rb:2:in `<top (required)>'
  /home/g_seux/.gem/ruby/2.5.0/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `require'
  /home/g_seux/.gem/ruby/2.5.0/gems/cucumber-core-3.2.0/lib/cucumber/core.rb:3:in `<top (required)>'
  /home/g_seux/.gem/ruby/2.5.0/gems/foodcritic-14.1.0/lib/foodcritic.rb:5:in `require'
  /home/g_seux/.gem/ruby/2.5.0/gems/foodcritic-14.1.0/lib/foodcritic.rb:5:in `<top (required)>'
  /home/g_seux/.gem/ruby/2.5.0/gems/foodcritic-14.1.0/bin/foodcritic:2:in `require_relative'
  /home/g_seux/.gem/ruby/2.5.0/gems/foodcritic-14.1.0/bin/foodcritic:2:in `<top (required)>'
  /home/g_seux/.gem/ruby/2.5.0/bin/foodcritic:23:in `load'
  /home/g_seux/.gem/ruby/2.5.0/bin/foodcritic:23:in `<top (required)>'

Ruby version: 2.5.0

Gem versions:

GEM
  remote: [internal rubygems mirror]
  specs:
    backports (3.11.4)
    cucumber-core (3.2.0)
      backports (>= 3.8.0)
      cucumber-tag_expressions (~> 1.1.0)
      gherkin (>= 5.0.0)
    cucumber-messages (1.0.0)
      google-protobuf (= 3.6.1)
    cucumber-tag_expressions (1.1.1)
    erubis (2.7.0)
    ffi-yajl (2.3.1)
      libyajl2 (~> 1.2)
    foodcritic (14.1.0)
      cucumber-core (>= 1.3)
      erubis
      ffi-yajl (~> 2.0)
      nokogiri (>= 1.5, < 2.0)
      rake
      rufus-lru (~> 1.0)
      treetop (~> 1.4)
    gherkin (6.0.10)
      cucumber-messages (= 1.0.0)
    google-protobuf (3.6.1)
    libyajl2 (1.2.0)
    mini_portile2 (2.3.0)
    nokogiri (1.8.4)
      mini_portile2 (~> 2.3.0)
    polyglot (0.3.5)
    rake (12.3.1)
    rufus-lru (1.1.0)
    treetop (1.6.10)
      polyglot (~> 0.3)

PLATFORMS
  ruby

DEPENDENCIES
  foodcritic

BUNDLED WITH
   1.16.1


@xtrasimplicity
Copy link
Member

xtrasimplicity commented Sep 24, 2018

Thanks, @kamaradclimber. We are aware of this issue and are working on fixing it.

Until we make a new release, I suggest locking gherkin to ~> 5.1.

@kamaradclimber
Copy link
Author

Duplicate of cucumber/cucumber-ruby-core#160 indeed.
I've followed https://rubygems.org/gems/gherkin to "Homepage" then https://github.com/cucumber/gherkin then https://github.com/cucumber/cucumber/tree/master/gherkin.
It seems that ruby code is hosted on another repository.

Thanks for your supper quick reaction

@xtrasimplicity
Copy link
Member

Hi @kamaradclimber, cucumber-core 3.2.1 has been released which pessimistically locks to v5.x. If you update using bundler, everything should now work as expected. 👍

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants