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

cucumber-messages incompatible with Ruby 2.7.0 #843

Closed
aslakhellesoy opened this issue Jan 6, 2020 · 1 comment
Closed

cucumber-messages incompatible with Ruby 2.7.0 #843

aslakhellesoy opened this issue Jan 6, 2020 · 1 comment
Labels
🐛 bug Defect / Bug language: ruby library: cucumber-messages 🔧 build Related to build / release process

Comments

@aslakhellesoy
Copy link
Contributor

It appears that the google-protobuf gem doesn't have any releases that are compatible with Ruby 2.7.0. I have tried google-protobuf version 3.8.0 (which the gemspec currently points to) as well as 3.11.2 (the latest version). It gives the following error:

LoadError:
  cannot load such file -- google/protobuf_c
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/google-protobuf-3.11.2-universal-darwin/lib/google/protobuf.rb:51:in `rescue in <top (required)>'
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/google-protobuf-3.11.2-universal-darwin/lib/google/protobuf.rb:48:in `<top (required)>'
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
# /Users/aslakhellesoy/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
# ./lib/cucumber/messages_pb.rb:4:in `<top (required)>'

Both these versions work fine on Ruby 2.6.5. There have been incompatibilities before: protocolbuffers/protobuf#5161

We have had problems with google-protobuf for JRuby (it's poorly supported) and now this. We need to switch to a pure-ruby version, as suggested in #813

That PR links to ruby-protobuf/protobuf#408 which we should provide a fix for, or find a workaround for.

@aslakhellesoy aslakhellesoy added 🐛 bug Defect / Bug language: ruby library: cucumber-messages 🔧 build Related to build / release process labels Jan 6, 2020
@rockorequin
Copy link

FWIW, I also ran into this error using ruby 2.7 with the latest version of google-protobuf (version 3.11.2). This command says "cannot load such file google/protobuf_c":

ruby -r google/protobuf -e'puts "hello"'

Lower down in the error message it also says "cannot load such file -- google/2.7/protobuf", so I tried symlinking the 2.6 folder to 2.7 using these commands (I'm using rvm):

cd /usr/local/rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google
ln -s 2.6 2.7

and this fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug language: ruby library: cucumber-messages 🔧 build Related to build / release process
Projects
None yet
Development

No branches or pull requests

2 participants