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 gem load error: cannot load such file -- google/2.6/protobuf_c with ruby 2.6.1p33 #5701

Closed
directionless opened this issue Feb 8, 2019 · 2 comments
Assignees
Labels

Comments

@directionless
Copy link

This appears to be a recurrence of #3509

Folks have commented there, but it seems worth bringing this into it's own ticket.

I'm running on macosx, ruby 2.6.1. And I see this problem with google-protobuf 2.6.0, 2.6.1, and 3.5.1.2.

Notably, I can load the gem fine with 3.7.0.rc.2

$ ruby --version
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin17]

$ bundle exec ruby -e 'require "google/protobuf"; puts "hi"'
Traceback (most recent call last):
	3: from -e:1:in `<main>'
	2: from -e:1:in `require'
	1: from /Users/seph/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/google-protobuf-3.6.1-universal-darwin/lib/google/protobuf.rb:48:in `<top (required)>'
/Users/seph/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/google-protobuf-3.6.1-universal-darwin/lib/google/protobuf.rb:48:in `require': cannot load such file -- google/2.6/protobuf_c (LoadError)
	4: from -e:1:in `<main>'
	3: from -e:1:in `require'
	2: from /Users/seph/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/google-protobuf-3.6.1-universal-darwin/lib/google/protobuf.rb:47:in `<top (required)>'
	1: from /Users/seph/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/google-protobuf-3.6.1-universal-darwin/lib/google/protobuf.rb:50:in `rescue in <top (required)>'
/Users/seph/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/google-protobuf-3.6.1-universal-darwin/lib/google/protobuf.rb:50:in `require': cannot load such file -- google/protobuf_c (LoadError)
@TeBoring
Copy link
Contributor

I guess the problem is, before 3.7.0.rc.2, we never supported ruby 2.6.
Thus, for ruby 2.6, you have to use protobuf 3.7

barnslig added a commit to barnslig/voctoweb that referenced this issue Apr 9, 2021
The update is needed as otherwise this old error appears again:
protocolbuffers/protobuf#5701
@KLCrow
Copy link

KLCrow commented Apr 19, 2021

I have the same error:
ruby-2.7.3
rails (4.2.11.1)
google-protobuf (3.15.8)
grpc (1.31.1)
cannot load such file -- ..._pb (LoadError)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants