Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Trouble configuring "google/cloud/ai_platform/v1" gem (Ruby)

wwa
Bronze 1
Bronze 1

I'm trying to access Vertex AI using ruby "google/cloud/ai_platform/v1" gem.
Minimal reproducer:

 

require 'google/cloud/ai_platform/v1'
::Google:‌‌:AIPlatform::V1::DatasetService::Client.configure do |config|
  config.credentials = "/home/user/promptest/test/prvkey.json"
end

 

The file contains correct service account key. Code fails with:

 

Traceback (most recent call last):
        4: from chat.rb:10:in `<main>'
        3: from /var/lib/gems/2.7.0/gems/google-cloud-ai_platform-v1-0.35.0/lib/google/cloud/ai_platform/v1/dataset_service/client.rb:71:in `configure'
        2: from chat.rb:11:in `block in <main>'
        1: from /var/lib/gems/2.7.0/gems/gapic-common-0.21.1/lib/gapic/config.rb:84:in `block in create_setter'
/var/lib/gems/2.7.0/gems/google-cloud-ai_platform-v1-0.35.0/lib/google/cloud/ai_platform/v1/dataset_service/client.rb:2087:in `block in <class:Configuration>': uninitialized constant GRPC::Core::Channel (NameError)

 

Searching for this error does not seem to yield anything useful. Please help.

1 1 487
1 REPLY 1

Hi @wwa,

Welcome and thank you for reaching out to our community.

It appears that there are missing components, please make sure you have properly installed the latest versions as there are fixes and formats that have been applied. You can start from this Ruby Client for the Vertex AI V1 API document.

You can reach out to Google Cloud Support if detailed assistance is needed.

Hope this helps.