RyMac
unread,Jul 26, 2011, 4:30:48 AM7/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gcal4ruby
Hello,
I am using the 0.5.5 version of the gem on my rails 3.0 app and I am
seemingly having trouble creating an event. I can start service, and
create a calendar just fine, but I get the following error when I try
to create an event:
NoMethodError: undefined method `debug' for #<GCal4Ruby::Calendar:
0x1036d8a68>
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:242:in `to_xml'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:236:in `map'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:236:in `to_xml'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:230:in `create'
from /opt/local/lib/ruby/gems/1.8/gems/gdata4ruby-0.1.5/lib/
gdata4ruby/gdata_object.rb:155:in `save'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:225:in `save'
from (irb):92
I looked at the code in this line, and it seems like it is checking
whether or not the service.debug = true, not the calendar, so i'm not
sure why it is throwing this error. Here's how I got here in IRB,
line by line:
service = GCal4Ruby::Service.new
service.authenticate(MY_GOOGLE_LOGIN, MY_GOOGLE_PASS)
calendar = GCal4Ruby::Calendar.find(service, 'Test 2', :first)
event = GCal4Ruby::Event.new(calendar)
event.title = "test title"
event.content = "test content"
event.where = "my house"
event.start = Time.now
event.end = 2.hours.from_now
event.all_day = false
event.calendar = calendar[0]
event.save
NoMethodError: undefined method `debug' for #<GCal4Ruby::Calendar:
0x1036d9990>
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:242:in `to_xml'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:236:in `map'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:236:in `to_xml'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:230:in `create'
from /opt/local/lib/ruby/gems/1.8/gems/gdata4ruby-0.1.5/lib/
gdata4ruby/gdata_object.rb:155:in `save'
from /opt/local/lib/ruby/gems/1.8/gems/gcal4ruby-0.5.5/lib/gcal4ruby/
event.rb:225:in `save'
I must be missing something here, but I'm not sure what. Obviously I
am getting a valid calendar object...is there some attribute that I am
missing?
Thanks!