google-api-client - 如何要求 google api 客户端
问题描述
我正在使用google-api-client
gem 在 Google 日历中创建事件。
我从谷歌找到了文档:https ://developers.google.com/calendar/quickstart/ruby
因此,当我安装 gem 时,在命令之后rails console
我尝试了 require libs:
require 'google/api_client',
require 'google/apis',
require 'google/apis/calendar_v3'
在每个require
我得到错误:LoadError: cannot load such file
宝石信息:
bundle info google-api-client
google-api-client (0.23.4)
Summary: Client for accessing Google APIs
Homepage: https://github.com/google/google-api-ruby-client
Path: /Users/danielsaifulin/.rvm/gems/ruby-2.4.0-rc1@sortd/gems/google-api-client-0.23.4`
解决方案
我不知道为什么,但是rails console
当我调用 require 'google/apis' 时 - 它不起作用,但是当我在 rails helper 中的某个函数中运行时它起作用了。
所以,问题结束了。
推荐阅读
- javascript - 表单验证模糊
- python - 如何找到多维字典的最小值?
- python - Tkinter 小部件的宽度搞砸了
- javascript - 来自错误的浏览器`console.error`堆栈跟踪,而不是调用console.error的位置?
- wordpress - 父母的滚动无法从 iframe 工作 - Flutter Web App
- python - Seaborn 的多个直方图
- python - 试图理解这个脚本中的 'lambda' 和 'map'
- mysql - MySQL:用于选择唯一患者的查询
- java - 如何使“未输入”的用户输入显示“不可用”——Java
- r - 在 R 数据框中聚合数据