Closed rafath closed 9 months ago
You should never have to run codegen yourself; that's a tool for us when we're building the gems. You could, I suppose, but you should just be using the officially released gems.
The strange part of your error message is here:
Google::Ads::GoogleAds::Factories::V6::Resources:Google::Ads::GoogleAds::VersionAlternate
That V6
is wrong; the only currently supported versions are V14
and V15
. The file mentioned there is something that would be generated by the codegen, so I have to imagine something went wrong with your attempt there.
When I do these steps:
> git clone https://github.com/googleads/google-ads-ruby.git
> cd google-ads-ruby
> bundle exec rake test
> bundle exec ruby examples/basic_operations/get_campaigns.rb -C[account id]
Everything works fine. The errors you've shown above shouldn't be example-specific, so I just picked one that's easy to execute.
further investigation showed, that
https://github.com/googleads/google-ads-ruby/blob/main/google-ads-googleads.gemspec#L37 is using old version of gapic-common
gem (0.21.1), new version has number 0.3.4. and it does not have those modules/classes. When I use old version of gapic-common Im getting gem versions error
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
faraday
google-ads-googleads was resolved to 26.0.0, which depends on
gapic-common (~> 0.20) was resolved to 0.21.1, which depends on
faraday (>= 1.9, < 3.a)
google-api-client (= 0.45.1) was resolved to 0.45.1, which depends on
googleauth (~> 0.9) was resolved to 0.17.1, which depends on
faraday (>= 0.17.3, < 2.0)
oauth2 (= 0.6.1) was resolved to 0.6.1, which depends on
faraday (~> 0.7)
signet (~> 0.17) was resolved to 0.19.0, which depends on
faraday (>= 0.17.5, < 3.a)
It looks like your oauth2
restriction at 0.6.1 (which is not enforced by this library) requires a version of faraday
that is <1.0 (implied by the ~> 0.7
requirement), but gapic-common
(which is required by this library) requires faraday
of >= 1.9.
You'll have to find a way to loosen your oauth2
restrictions. The newest verison (2.0.9) does support a modern faraday
version, see: https://rubygems.org/gems/oauth2
@mcloonan thank you for pointing it out <3 missed that but tbh I assumed that oauth comes from this gem too ;/.
Describe the bug:
Im trying to execute
upload_offline_conversion
. I set all needed params, have properly configured credentials and so on, during the process, I've got this error:I have downloaded gem
google-ads-ruby
and run the comamnd:sh scripts\codegen.sh
then in my local app, I've pointed gem to the local path. Next error I've got:Steps to Reproduce: Just execute the example from: https://github.com/googleads/google-ads-ruby/blob/75dfdea2c0dd751d76497333f1defa93ed1e6ed3/examples/remarketing/upload_offline_conversion.rb#L28
Expected behavior: it should call the Google API and send the record.
Client library version and API version: Client library version: branch 0.26 Google Ads API version: v15
Gemfile lock:
Request/Response Logs:
Anything else we should know about your project / environment: Ruby 3.1.3