From jeff at rosejn.net Fri Nov 30 06:15:18 2007 From: jeff at rosejn.net (Jeff Rose) Date: Fri, 30 Nov 2007 12:15:18 +0100 Subject: [iCalendar-devel] getting a method missing for 'summary' -- help w/ remote ical! In-Reply-To: References: Message-ID: <474FF0C6.6050500@rosejn.net> Hi Brian, I think the best way to debug things is if you can post an example calendar to the list which breaks the library. By looking at your stack trace it seems to be a bad calendar to me. I could be mistaken though. (It looks like it's trying to parse a FreeBusy component when it runs into a summary property. FreeBusy's don't have a summary, so that would be a bogus entry.) Either way, it would be good to figure out what's going on, and maybe the library should do a better job of continuing on past bad calendar properties and/or components. Not sure what I think about that though... -Jeff Brian LeRoux wrote: > Any help greatly appreciated! Showing rather than explaining below > (url changed): > > > irb(main):002:0> require 'rubygems' > => true > > irb(main):003:0> require 'net/http' > => true > > irb(main):004:0> url = URI.parse 'http://www.somewebsite/basic.ics' > => # > > irb(main):005:0> req = Net::HTTP::Get.new(url.path) > => # > > irb(main):006:0> res = Net::HTTP.start(url.host, url.port) {|http| > http.request(req) } > => # > > irb(main):007:0> require 'icalendar' > => true > > irb(main):008:0> Icalendar.parse res.body > > NoMethodError: Method Name: summary > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/component.rb:413:in > `method_missing' > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/parser.rb:179:in > `send' > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/parser.rb:179:in > `parse_component' > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/parser.rb:139:in > `parse_component' > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/parser.rb:101:in > `parse' > from /opt/local/lib/ruby/gems/1.8/gems/icalendar-1.0.1/lib/icalendar/parser.rb:16:in > `parse' > from (irb):8 > from /opt/local/lib/ruby/1.8/time.rb:53 > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel