googleads / google-ads-ruby

Google Ads API Ruby Client Library
https://developers.google.com/google-ads/api/
Apache License 2.0
70 stars 67 forks source link

Faraday multipart load bug #481

Open eslamodeh opened 7 months ago

eslamodeh commented 7 months ago

Hey everyone,

I am using the latest version of this gem 25.0.2. bundle install works fine but whenever you try to load the console, it raises an error regarding faraday multipart:

/Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- faraday/request/multipart (LoadError)
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/google-api-client-0.7.1/lib/google/api_client/request.rb:16:in `<main>'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/google-api-client-0.7.1/lib/google/api_client.rb:27:in `<main>'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/google_drive-1.0.6/lib/google_drive.rb:5:in `<main>'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:55:in `each'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:55:in `block in require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:44:in `each'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:44:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler.rb:186:in `require'
        from /Users/eslam.odeh/Desktop/dos/config/application.rb:9:in `<main>'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/command/actions.rb:22:in `require_application!'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/commands/console/console_command.rb:105:in `perform'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/command/base.rb:87:in `perform'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/command.rb:48:in `invoke'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.6/lib/rails/commands.rb:18:in `<main>'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/eslam.odeh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from bin/rails:6:in `<main>'
eslamodeh commented 7 months ago

Update on this:

I had the following gems in my files:

gem 'google-ads-googleads', '~> 25.0', '>= 25.0.2'
gem 'google_drive'

After removing google_drive, i was able to load the library

mcloonan commented 6 months ago

What do you mean by "load the console"? If you resolved it by removing an extra gem, it sounds like it might be some kind of dependency conflict.

eslamodeh commented 6 months ago

I meant rails console, using: bundle exec rails console

dimanyc commented 1 week ago

@eslamodeh 👋 hey. Were you able to get around this? nvm. found the issue.

For anyone running into this, the problem is that the current version of the google_drive gem uses outdated dependencies that are pinned to specific versions. See https://github.com/gimite/google-drive-ruby/pull/433