ip2k / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

main page example not work (or contains obsolete code) #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. clean install ubuntu 11.10 i386 (virtualbox)
1. sudo apt-get install ruby rubygems
2. sudo gem install google-api-client
3. copy example usage from 
http://code.google.com/p/google-api-ruby-client/wiki/Documentation to file 
example.rb
4. run ruby example.rb

What is the expected output? What do you see instead?
example.rb:2: in 'require': no such file to load -- google/api_client 
(LoadError)
Expect to see some working code

after fixing (adding line "require 'rubygems'" to start of example.rb) I've got:
/var/lib/gems/1.8/signet-0.2.4/lib/signet/oauth_1/client.rb:802:in 
'fetch_token_credential': Authorization failed. Server message: 
(Signet::AuthorizationError)
The token is invalid
  from /var/lib/gems/1.8/signet-0.2.4/lib/signet/oauth_1/client.rb:844:in 'fetch_token_credential!'
  from example.rb:31
and code still not work
Need to clarify usage of example

What version of the product are you using? On what operating system?
google-api-client 0.3.0
ubuntu 11.10 i386
ruby 1.8.7
rubygems 1.7.2

Please provide any additional information below.

Original issue reported on code.google.com by nikolay....@absalt.com on 19 Dec 2011 at 9:59

GoogleCodeExporter commented 9 years ago
Yes, the documentation is badly out of date. I'll get on this as soon as I can, 
but might not make it before the holidays.

Original comment by bobaman@google.com on 21 Dec 2011 at 10:46

GoogleCodeExporter commented 9 years ago

Original comment by bobaman@google.com on 10 Jan 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Issue 32 has been merged into this issue.

Original comment by bobaman@google.com on 10 Jan 2012 at 7:13

GoogleCodeExporter commented 9 years ago
just add
require 'rubygems'

Original comment by sakri...@gmail.com on 3 Feb 2012 at 3:45

GoogleCodeExporter commented 9 years ago
Technically you could be using 'bundler' or 'rip' or some other mechanism to 
get it loaded, but since I think that most people who care about the 
distinction will be Ruby experts, sure, makes sense to add it in.

Original comment by bobaman@google.com on 5 Feb 2012 at 10:39