views:

16

answers:

0

Hi folks, I am using rails 3 and the ri_cal gem. I am not able to produce a valid .ics file. It gets generated, but AppleCalendar or GoogleCalendar say it's empty. What did I do wrong? Help appreciated, thanks in advance :)

My Controller

class WebsitesController < ApplicationController
  def index

    respond_to do |format|

      format.ics 

    end
  end
end

and index.ics.builer

RiCal.Calendar do
    event do
      description "MA-6 First US Manned Spaceflight"
      dtstart     DateTime.parse("2/20/1962 14:47:39")
      dtend       DateTime.parse("2/20/1962 19:43:02")
      location    "Cape Canaveral"
      add_attendee "[email protected]"
      alarm do
        description "Segment 51"
      end
    end
  end