For a Rails 3.2.2 project, I got this error:
LoadError (cannot load such file -- google/api_client/client_secrets):
app/controllers/subscriptions_controller.rb:2:in <top (required)>'
lib/flash_session_cookie_middleware.rb:17:incall'
I also doing the same configuration on another Rails 4 project, and everything works fine.
P/S:
It's not related to this issue: https://github.com/google/google-api-ruby-client/issues/123
After putting google-api-client into Gemfile:
I made some experience with "rails c". After execute "rails c",
It turns out problem only occurs with loading 'google/api_client/client_secrets'
More information.
I had a very similar situation with this issue: http://stackoverflow.com/questions/17241650/conflicting-dependencies-in-same-gem-bundler-could-not-find-compatible-version
I also posted here: http://stackoverflow.com/questions/24689397/ruby-on-rails-gem-dependency-conflict-when-install-google-api-client
I had to do
gem 'google-api-client', '~> 0.7.1'
then bundle update google-api-client addressable faraday and that let me figure out which other gems to update for me to be able to use that newer gem version. Because of dependencies by default bundle was installing older version for me.
gem 'google-api-client', '~> 0.7.1'
did the trick. thanks @paneq
I get NameError: uninitialized constant Google::API even after updating my gems using bundle update and adding the require statements.
The gem 'google-api-client' is 0.8.6, though I tried it with version 0.7.1 as well.
Here's a code snippet from my UsersController:
require 'google/api_client'
require 'google/api_client/client_secrets'
require 'google/api_client/auth/installed_app'client = Google::API.new(application_name: 'my-social-hub')`
The problem occurs on the last line, all the require statements are ok.
Any idea why?
Thanks,
I had the same issue here, I had to revert back to 0.8.2 and add this to my Gemfile...
gem 'google-api-client', '0.8.2', require: 'google/api_client'
I am still having this same issue despite adding
gem 'google-api-client', '0.8.2', require: 'google/api_client'
i had 'google-api-client', '0.9' installed
changing it to '0.8.2' did it for me
i had 'google-api-client', '0.9' installed
changing it to '0.8.2' did it for me
Worked for me too.
i got this`require': cannot load such file -- google/api_client (LoadError)
i use gem 'google-api-client', '~> 0.9.15', :require => 'google/api_client'
@karthickibz require => 'google/apis'
All i did was restart my webrick server and that worked for me :)
gem 'google-api-client', '0.8.2', require: 'google/api_client'
added this to my Gemfile and still getting errors when running rails console
@PurityMaina The path you are specifying to require does not exist, which is why you are getting a LoadError. Bundler can be configured to auto-load dependencies, and it uses the gem's name to guess at how to load the gem. There are two solutions. First, you can disable the auto-loading of the gem in your Gemfile, and let whatever dependency is using google-api-client require it:
gem 'google-api-client', require: false
Second, you can specify a path that _does_ exist in your Gemfile for Bundler to auto-load. The path I would use is 'google/apis':
gem 'google-api-client', require: 'google/apis'
Either of these approaches will allow you to use an up-to-date version of google-api-client in your app.
gem 'google-api-client', '0.24.3', require: 'google/apis'
I've tried the approaches on this page, but I'm still getting 'require': cannot load such file -- google/cloud/language (LoadError) no matter what I do with my gem file.
@reduviidae that file is found in the google-cloud-language gem, not this gem. Please follow the installation instructions there.
Thank you this worked.
On Wed, 2 Jan 2019 at 18:13, Mike Moore notifications@github.com wrote:
@reduviidae https://github.com/reduviidae that file is found in the
google-cloud-language
https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-language
gem, not this gem. Please follow the installation instructions there.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/google-api-ruby-client/issues/132#issuecomment-450888917,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQBFz7rpYqYIjXssfGfmaAWcG-35Rqmeks5u_MywgaJpZM4CJzRd
.>
Kind Regards,
Purity Maina :https://www.linkedin.com/in/puritymaina/
http://munnworks.epizy.com
Please consider the impact on the environment before printing this e-mail.
Most helpful comment
I had to do
gem 'google-api-client', '~> 0.7.1'then
bundle update google-api-client addressable faradayand that let me figure out which other gems to update for me to be able to use that newer gem version. Because of dependencies by default bundle was installing older version for me.