# Webcal url

**URL:** <https://www.ruby-forum.com/t/webcal-url/96446>\
**Category:** Rails\
**Created:** [June 28, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/webcal-url/96446 "2006-06-28T20:56:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSSSSbastien\_Gruhie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@SSSSSbastien\_Gruhie](https://www.ruby-forum.com/u/SSSSSbastien_Gruhie)\
**Post date:** [June 28, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/webcal-url/96446/1 "2006-06-28T20:56:40Z")

</div>

Hi

I’d like to create a webcal link to share a calendar with iCal like  
it’s done in Basecamp for example.  
I know how to create the file using icalendar ruby library and iCal  
can open it, but if I send this file using an url like webcal://  
localhost:3000/ical/1151495837  
iCal says that data are not valid.

Any ideas?

Thanks.

PS here is my rb code

def ical\_data  
cal = Icalendar::Calendar.new  
event = cal.event # This automatically adds the event to the  
calendar  
event.user\_id = “removed\_email\_address@domain.invalid”  
event.timestamp = DateTime.now  
event.summary = “Meeting with the man.”

```
 # We can output the calendars as strings to write to a file,
 # network port, database etc.
 cal_string = cal.to_ical

 send_data cal_string

```

end

---

<div class="post-metadata">

**Author:** ![SSSSSbastien\_Gruhie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@SSSSSbastien\_Gruhie](https://www.ruby-forum.com/u/SSSSSbastien_Gruhie)\
**Post date:** [June 29, 2006, 12:18am UTC](https://www.ruby-forum.com/t/webcal-url/96446/2 "2006-06-29T00:18:06Z")

</div>

On 28-jun-2006, at 20:54, SÃ©bastien Gruhier wrote:

> Hi
> 
> I’d like to create a webcal link to share a calendar with iCal like  
> it’s done in Basecamp for example.  
> I know how to create the file using icalendar ruby library and iCal  
> can open it, but if I send this file using an url like webcal://  
> localhost:3000/ical/1151495837  
> iCal says that data are not valid.

## Are you sure you are sending the right content-type? Have you tried your URL in a browser?

Julian ‘Julik’ Tarkhanov  
please send all personal mail to  
me at julik.nl

---

<div class="post-metadata">

**Author:** ![SSSSSbastien\_Gruhie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@SSSSSbastien\_Gruhie](https://www.ruby-forum.com/u/SSSSSbastien_Gruhie)\
**Post date:** [June 29, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/webcal-url/96446/3 "2006-06-29T17:46:25Z")

</div>

content-type was fine, I just forgot to remove my authenticate filter  
on that function 🙂  
Works fine now

thanks  
Seb

Le 29 juin 06 à 00:15, Julian ‘Julik’ Tarkhanov a écrit :
