jhk753 / gmail-ruby-api

Ruby interface for Gmail API
Other
26 stars 20 forks source link

Documentation example #23

Open adamtongu opened 9 years ago

adamtongu commented 9 years ago

Hi,

I try to run a simple request based on what I see in the docs, but I am getting this error:

/home/me/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/gmail-api-ruby-0.0.11/lib/gmail.rb:64:in request': undefined methodexecute' for nil:NilClass (NoMethodError) from /home/me/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/gmail-api-ruby-0.0.11/lib/gmail/base/list.rb:13:in all' from testgmailapi.rb:13:in

'

Here is my code:

require "gmail"

Gmail.client_id = "xxx" Gmail.client_secret = "xxx" Gmail.refresh_token = "xxxx"

Gmail::Message.all

I am doubting the client_secret.json should be stored in some special directory instead of the same directory i am running the script in.

Could you help me with that?

Thanks