Skip to content

Ruby: Gem version 3.11.2 doesn't load on Ruby 2.7 #7070

Closed
@threeplanetssoftware

Description

What version of protobuf and what language are you using?
Version: 3.11.2 (released ~December 13, 2019)
Language: Ruby 2.7 (released December 25, 2019)

Windows 8, Linux Ubuntu and Mint

What runtime / compiler are you using (e.g., python version or gcc version)
Ruby 2.7

What did you do?
Steps to reproduce the behavior:

  1. gem install google-protobuf
  2. Run any Ruby code which has require 'google-protobuf' at the start
  3. Get Load Errors, see below.

This can also be reproduced by using Travis-CI's 2.7 environment on any of their images.

What did you expect to see
On Ruby 2.3 through 2.6 this results in the expected program execution.

What did you see instead?
On Ruby 2.7, on each platform I've tested on, this results in the following two errors:

[Snip]
1: from /home/travis/.rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google/protobuf.rb:49:in '<top (required)>'

/home/travis/.rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google/protobuf.rb:49:in require: cannot load such file -- google/2.7/protobuf_c (LoadError)

[Snip]

2: from /home/travis/.rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google/protobuf.rb:48:in <top (required)>

1: from /home/travis/.rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google/protobuf.rb:51:in rescue in <top (required)>

/home/travis/.rvm/gems/ruby-2.7.0/gems/google-protobuf-3.11.2-x86_64-linux/lib/google/protobuf.rb:51:in require: cannot load such file -- google/protobuf_c

Anything else we should know about your project / environment
This appears to be related to Ruby 2.7 releasing a few days after 3.11.2 released as it occurs on each system I try with 2.7 on it (including Travis-ci), but any older Ruby version works fine with 3.11.2. As 27 is a major release for Ruby and new installs will start to incorporate it, suggest either not letting the gem install on it, or putting out a bug fix to support 2.7 prior to the next release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions