I am using gdata ruby gem for Google APIs to get Calendars. (as per http://code.google.com/apis/gdata/articles/gdata_on_rails.html#ClientLogin)
Problem is that even if the calendar feed has valid XML, I keep on getting :
NoMethodError (undefined method 'elements' for nil:NilClass):
app/controllers/g_data_controller.rb:74:in block in fetch_feed'
app/controllers/g_data_controller.rb:63:in
fetch_开发者_运维技巧feed'
app/controllers/g_data_controller.rb:122:in `index'
feed= @client.get(m.gcal_id).to_xml
if feed
entry=feed.elements['entry'] #Error on this line !
Not sure what is the matter with this code BTW, I am using rexml (as suggested by google) to parse the XMl elements.
精彩评论