gimite / google-spreadsheet-ruby

Ruby library to read/write Google Spreadsheet
Other
306 stars 52 forks source link

Google app-engine #6

Closed thopre closed 14 years ago

thopre commented 14 years ago

Hello,

a user of my 'roo' gem sent me this email. Is this possible with your gem?

-Thomas

Hi

I am trying to open a spreadsheet hosted on my Google app-engine account. But when i run the script, i get :

/usr/local/lib/ruby/gems/1.8/gems/gimite-google-spreadsheet-ruby-0.0.6/ lib/google_spreadsheet.rb:177:in get': Error 400 Bad Request for GET http://spreadsheets.google.com/feeds/worksheets/0Aji6nYSYa4b_dDRnOWNf... The spreadsheet at this URL could not be found. Make sure that you have the right URL and that the owner of the spreadsheet hasn't deleted it. (GoogleSpreadsheet::Error) from /usr/local/lib/ruby/gems/1.8/gems/gimite-google-spreadsheet- ruby-0.0.6/lib/google_spreadsheet.rb:305:inworksheets' from /usr/local/lib/ruby/gems/1.8/gems/roo-1.9.0/lib/roo/google.rb: 37:in initialize' from bulktest.rb:4:innew' from bulktest.rb:4

It is not a generic Google Account, so the spreadsheet is not located at spreadsheets.google.com/ccc?key=XXXXX, but instead at spreadsheets.google.com/a/domain.com/ccc?key=XXXXX. Has anyone come across or better solved this error?

Thanks

bmblack34 commented 14 years ago

google-spreadsheet-ruby does indeed seem to support Google Apps accounts. I am using it right now on a project with a Google Apps account.

gimite commented 14 years ago

Hmm I'm not sure. As bmblack34 says, it should work fine with Apps account. Possible reasons I can think of are:

You can identify which of above is issue by e.g. running it on native Ruby (not App Engine or JRuby), using spreadsheet on default domain (not Apps's), running google-spreadsheet-ruby's unit test on JRuby, etc.