ruby
@client.query(
"SELECT * FROM table_x",
standard_sql: true,
params: {}
)
ArgumentError: wrong number of arguments (given 3, expected 2) on this lineruby
gapi = service.query_job updater.to_gapi # will throw ArgumentError: wrong number of arguments (given 3, expected 2)
Job.from_gapi gapi, service
1.26.0 everything worked fine.pry(#<Google::Cloud::Bigquery::Project>)> service.query_job updater.to_gapi
ArgumentError: wrong number of arguments (given 3, expected 2)
from /Users/robi/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/google-api-client-0.52.0/lib/google/apis/core/base_service.rb:128:in `initialize'
Apologies for the hiccup here. There appears to be a conflict with the older google-api-client gem. Try updating to the fixed version 0.53.0 of google-api-client. That should fix the issue.
Even better, though, remove google-api-client from your bundle altogether if you can. We have recently released individual gems for each client, so you can install just the clients you are using, and should no longer need google-api-client (which is enormous). For example, if you are using the Drive V3 client, install google-apis-drive_v3.
@robikovacs Closing now since the release of google-api-client/v0.53.0 should resolve this issue. But please reopen if you still have any trouble. Thanks for reporting this.
Thanks, @dazuma, @quartzmo, for the quick response and for the advice, it worked. Much appreciated!
Most helpful comment
Apologies for the hiccup here. There appears to be a conflict with the older google-api-client gem. Try updating to the fixed version 0.53.0 of google-api-client. That should fix the issue.
Even better, though, remove google-api-client from your bundle altogether if you can. We have recently released individual gems for each client, so you can install just the clients you are using, and should no longer need google-api-client (which is enormous). For example, if you are using the Drive V3 client, install google-apis-drive_v3.