anycable / anycable-rails

AnyCable for Ruby on Rails applications
https://anycable.io
MIT License
495 stars 35 forks source link

Ruby 2.7.2 google/protobuf_c problem (M1) #160

Closed xxSkyy closed 3 years ago

xxSkyy commented 3 years ago

Its information for others If anyone also has error like

/Users/user/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- google/protobuf_c (LoadError)

after adding anycable-rails to Ruby 2.7.2 just add

gem 'google-protobuf', git: 'https://github.com/google/protobuf'

to your gemfile, bundle it and you're fine. (adding gem 'google-protobuf' without git url wont work)

I've seen simmilar problem over year ago on ruby 2.6.0, but it still persist on 2.7.2 (at least on apple M1)

jjb commented 2 years ago

@xxSkyy is this what you are still using? I could not get it to work, I need to use this monkeypatch: https://github.com/grpc/grpc/issues/21514#issuecomment-961820184