Q:

Google Calendar API server to server Rails

I want insert events in my calendar after some user's actions. That's why I'm want use server-to-server authorization with Google API. I wrote next code: 
require 'google/apis/calendar_v3'
require 'googleauth'

require 'google/api_client/client_secrets'
require 'google/api_client'

Initialize the client
client = Google::Apis::CalendarV3::CalendarService.new

load and decrypt private key
key = G.load_from_pkcs12('google_secrets.json', 'notasecret')

generate request body for authorization
client.authorization = Signet::OAuth2::Client.new(
    :token_credential_uri => 'https://accounts.google.com/o/oauth2/token',
    :audience             => 'https://accounts.google.com/o/oauth2/token',
    :scope                => 'https://www.googleapis.com/auth/calendar',
    :issuer               => '....',
    :signing_key          => key)

fetch access token
client.authorization.fetch_access_token!

# load API definition
service = client.discovered_api('calendar', 'v3')

# there is a place for variable "event" declaration

client.execute(:api_method => service.event.insert,
               :parameters => { '....'   => 'primary' },
               :event       => event)

But when I try to use that code, i recive next answer:
cannot load such file -- google/api_client (LoadError)

I'm understand that maybe I must use previous version of gem google-api-client(<0.9) for get rid of that error. But don't know how i must make insert event with syntax of < 0.9 google api version.

A:

I found solution.
Use for it api v.0.8.2 and see next page:
Rails + Google Calendar API events not created

