cc @TheRoyalTnetennba @frankyn
Found while testing github.com/GoogleCloudPlatform/ruby-docs-samples with Ruby 2.6.
Example failure:
An error occurred while loading ./spec/product_search_update_product_labels_spec.rb.
Failure/Error: require "google/cloud/vision"
LoadError:
cannot load such file -- google/protobuf_c
# /usr/local/bundle/gems/google-protobuf-3.6.1-x86_64-linux/lib/google/protobuf.rb:50:in `require'
# /usr/local/bundle/gems/google-protobuf-3.6.1-x86_64-linux/lib/google/protobuf.rb:50:in `rescue in <top (required)>'
# /usr/local/bundle/gems/google-protobuf-3.6.1-x86_64-linux/lib/google/protobuf.rb:47:in `<top (required)>'
# /usr/local/bundle/gems/googleapis-common-protos-types-1.0.2/lib/google/rpc/status_pb.rb:4:in `require'
# /usr/local/bundle/gems/googleapis-common-protos-types-1.0.2/lib/google/rpc/status_pb.rb:4:in `<top (required)>'
# /usr/local/bundle/gems/grpc-1.18.0-x86_64-linux/src/ruby/lib/grpc/google_rpc_status_utils.rb:16:in `require'
# /usr/local/bundle/gems/grpc-1.18.0-x86_64-linux/src/ruby/lib/grpc/google_rpc_status_utils.rb:16:in `<top (required)>'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/grpc.rb:31:in `require'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/grpc.rb:31:in `<top (required)>'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/errors.rb:32:in `require'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/errors.rb:32:in `<top (required)>'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/api_callable.rb:32:in `require'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax/api_callable.rb:32:in `<top (required)>'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax.rb:30:in `require'
# /usr/local/bundle/gems/google-gax-1.5.0/lib/google/gax.rb:30:in `<top (required)>'
# /usr/local/bundle/gems/google-cloud-vision-0.32.2/lib/google/cloud/vision.rb:16:in `require'
# /usr/local/bundle/gems/google-cloud-vision-0.32.2/lib/google/cloud/vision.rb:16:in `<top (required)>'
# ./spec/spec_helper.rb:16:in `require'
# ./spec/spec_helper.rb:16:in `<top (required)>'
# ./spec/product_search_update_product_labels_spec.rb:15:in `require'
# ./spec/product_search_update_product_labels_spec.rb:15:in `<top (required)>'
# ------------------
# --- Caused by: ---
# LoadError:
# cannot load such file -- google/2.6/protobuf_c
# /usr/local/bundle/gems/google-protobuf-3.6.1-x86_64-linux/lib/google/protobuf.rb:48:in `require'
We are still waiting on a google-protobuf release that includes a precompiled binary for ruby 2.6. You can install the gem and specify the platform as ruby and the gem will compile the library. More information at protocolbuffers/protobuf#5161.
Hello, I am also experiencing issues while using Bigtable in Ruby 2.5.1 (it works perfectly on Ruby 2.4.5) when creating a mutation entry:
I found someone having a similar trace here: https://github.com/protocolbuffers/protobuf/issues/4469
This is the code I am running
require 'google/cloud/bigtable'
bigtable = Google::Cloud::Bigtable.new
instance = bigtable.instance('test')
table = instance.table('test')
unless table.exists?
instance.create_table('test')
end
begin
table.column_family('v1', Google::Cloud::Bigtable::GcRule.max_versions(3)).create
rescue Google::Cloud::AlreadyExistsError
p 'Existing column family'
end
entry = table.new_mutation_entry('test-1')
# everything works until now, breaks when calling set_cell
entry.set_cell(
"v1", "fiel01", "XYZ", timestamp: Time.now.to_i * 1000
)
table.mutate_row(entry)
Error trace
Traceback (most recent call last):
4: from main.rb:30:in `<main>'
3: from /Users/perezpaya/.gem/ruby/2.5.1/gems/google-cloud-bigtable-0.2.0/lib/google/cloud/bigtable/mutation_entry.rb:116:in `set_cell'
2: from /Users/perezpaya/.gem/ruby/2.5.1/gems/google-cloud-bigtable-0.2.0/lib/google/cloud/bigtable/mutation_entry.rb:116:in `new'
1: from /Users/perezpaya/.gem/ruby/2.5.1/gems/google-cloud-bigtable-0.2.0/lib/google/cloud/bigtable/mutation_entry.rb:116:in `initialize'
/Users/perezpaya/.gem/ruby/2.5.1/gems/google-cloud-bigtable-0.2.0/lib/google/cloud/bigtable/mutation_entry.rb:116:in `msgclass': wrong number of arguments (given 36816, expected 0) (ArgumentError)
@perezpaya The problem you describe is different than the one this issue is for. A workaround is described in protocolbuffers/protobuf#4469, and next google-protobuf release should include the fix for this.
What's the status now that protobuf 3.7.0 was released?
This is being worked on in #2851.
This has been fixed for a number of months. Closing.
Most helpful comment
Example failure: