Search code examples
ruby-on-railsgoogle-calendar-apigoogle-api-clientruby-on-rails-5

"uninitialized constant Google::Apis" when calling google API


Using https://developers.google.com/google-apps/calendar/quickstart/ruby api for google calendar and event listing.

When running that code getting this error at SCOPE = Google::Apis::CalendarV3::AUTH_CALENDAR_READONLY

I have google-api-client (= 0.8.2) gem


Solution

  • I see that you're using 0.8.2 gem. According to this google github post, you ought to use

      Google::APIClient.new
    

    instead of

      Google::Apis