# gdocs4ruby cannot work

**URL:** <https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404>\
**Category:** rubyonrails-talk\
**Created:** [October 25, 2011, 12:32pm UTC](https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404 "2011-10-25T12:32:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [October 25, 2011, 12:32pm UTC](https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404/1 "2011-10-25T12:32:32Z")

</div>

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 &nbsp;&nbsp;&nbsp;&nbsp;service = GDocs4Ruby::Service.new() &nbsp;&nbsp;&nbsp;&nbsp;service.debug = true &nbsp;&nbsp;&nbsp;&nbsp;begin &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if @authentication = service.authenticate(params[:user\_name], params[:password]) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@folders = service.folders \<\<=================== &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@documents = service.files

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;&nbsp;&nbsp;rescue Exception =\> e &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warn(e.message) &nbsp;&nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;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](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

---

<div class="post-metadata">

**Author:** ![Everaldo\_Gomes](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Everaldo\_Gomes](https://discuss.rubyonrails.org/u/Everaldo_Gomes)\
**Post date:** [October 25, 2011, 12:42pm UTC](https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404/2 "2011-10-25T12:42:20Z")

</div>

Hi!

I think you should put “include GDocs4Ruby” inside your controller.

Best Regards,

Everaldo

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [October 25, 2011, 12:55pm UTC](https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404/3 "2011-10-25T12:55:56Z")

</div>

hi Everaldo

Actually this error is happen due to some other reason

service.files working correctly but when I try to execute : service.folders it gets error:

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

In previous service.folders command worked fine. but currently it is not working.........

---

<div class="post-metadata">

**Author:** ![Everaldo\_Gomes](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Everaldo\_Gomes](https://discuss.rubyonrails.org/u/Everaldo_Gomes)\
**Post date:** [October 25, 2011, 1:25pm UTC](https://discuss.rubyonrails.org/t/gdocs4ruby-cannot-work/61404/4 "2011-10-25T13:25:41Z")

</div>

Hi!

I was looking at your error message and I saw:

> 403.4 SSL required

I don’t know how to solve, but it looks like with a SSL problem.

Best Regards,

Everaldo
