Error in GCal4Ruby::Recurrance

31 views
Skip to first unread message

Tobias Holz

unread,
Dec 21, 2011, 8:07:36 AM12/21/11
to gcal4ruby
*sry for doubleposting this but I wrote the first one in German m(*

Hej Folks,
I found an error that throws the following message:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
recurrence.rb:
27:in `parse_complete': undefined method `gsub' for nil:NilClass
(NoMethodError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/recurrence.rb:82:in `block in load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/recurrence.rb:65:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/recurrence.rb:65:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/recurrence.rb:55:in `initialize'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/event.rb:337:in `new'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/event.rb:337:in `block in load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/event.rb:306:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/event.rb:306:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/calendar.rb:120:in `block in events'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/calendar.rb:117:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/gcal4ruby-0.5.5/lib/
gcal4ruby/calendar.rb:117:in `events'

This error occurs when parsing the start_time of an event which I got
through Calendar.events . The only solution I found is commenting the
lines 72-76 and 79-89.

Did Google manage to change things in the XML-File?


One event start_time would be: "2012-02-15 15:00:00 +0100" which i can
only get if these lines where commented, otherwise theerror message
occurs.

Someone got an idea?

Chuck Emary

unread,
Oct 23, 2012, 12:03:23 AM10/23/12
to gcal...@googlegroups.com, staxc...@googlemail.com
FWIW - I was working an issue the other day where I was inserting a date time stamp into a mongoDB, it looked like this before inserting: "2012-02-15 15:00:00 +0100".  When I pulled it out it looked like this:
"2012-02-15 15:00:00 UTC".  I was then passing it to Time.parse(), and I was getting a similar error "....undefined method `gsub' for nil:NilClass...".  I ended up stripping the UTC off, then parsing it and it worked fine. Not likely to be at all related, some of the details are similar enough that perhaps it will help you debug some more.  Good hunting....
Reply all
Reply to author
Forward
0 new messages