ruby - cannot load such file -- google/apis/compute_v1, Using service accounts to create (server to server) Google Calendar events. Using rails -
i'm running rails app , trying create google calendar events when customer makes delivery request. i've created service account , trying oauth working controller same suggest. requiring googleauth working because i've got google api gem can't find google/apis/compute_v1 , won't go past that. can't find description of it's supposed coming from. know?
class calendarcontroller < applicationcontroller require 'googleauth' require 'google/apis/compute_v1' def create_event compute = google::apis::computev1::computeservice.new # environment configured authorization scopes = ['https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/compute', 'https://www.googleapis.com/auth/calendar'] compute.authorization = google::auth.get_application_default(scopes) end end
here's errors when try , activate calendar#create_event
cannot load such file -- google/apis/compute_v1
extracted source (around line #3): class calendarcontroller < applicationcontroller require 'googleauth' require 'google/apis/compute_v1' def create_event compute = google::apis::computev1::computeservice.new rails.root: /users/myname/code/foldername/appname
application trace | framework trace | full trace app/controllers/calendar_controller.rb:3:in <class:calendarcontroller>' app/controllers/calendar_controller.rb:1:in
' error occurred while loading following files: google/apis/compute_v1
turns out need put in gem file gem 'google-api-client', '0.9.pre1' had gem 'google-api-client' , using earlier version of gem.
Comments
Post a Comment