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 <li...@ruby-forum.com>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('abc...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to