Hi!

I think you should put "include GDocs4Ruby" inside your controller.

Best Regards,
Everaldo
On Tue, Oct 25, 2011 at 10:32 AM, Kausik Bakshi wrote:

In previous I use gdocs4ruby to access Google document of my account
from outside the google.

I used the code inside my controller:

require 'rubygems'
require 'gdata'
require 'gdocs4ruby'
include GDocs4Ruby
class DocumentController < ApplicationController
def creat
service = GDocs4Ruby::Service.new()
service.debug = true
begin
if @authentication = service.authenticate(params[:user_name],
params[:password])
@folders = service.folders <<===================
@documents = service.files


end
rescue Exception => e
warn(e.message)
end
end
end


all the things working correctly ,but the code service.folders are not
working.


I wrote the following code in rails console:

equire "rubygems"
require 'gdocs4ruby'
include GDocs4Ruby
service = GDocs4Ruby::Service.new()
service.debug = true
service.authenticate('abc123@gmail.com','xxxxxxxxxxxx')

service.files

this fetch all the file list inside my application

but when I execute :
service.folders

I am getting following error:

invalid response received: 403
GData4Ruby::HTTPRequestFailed: <errors
xmlns='http://schemas.google.com/g/2005
'><error><domain>GData</domain><code>ServiceForbiddenException</code><internalReason>403.4
SSL required</internalReason></error></errors>

some day's before this code had been working fine.

what happed if you have any desire solution. Please help

Advance Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 25, '11 at 12:32p
activeOct 25, '11 at 1:26p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Everaldo Gomes: 2 posts Kausik Bakshi: 2 posts

People

Translate

site design / logo © 2021 Grokbase