How to send instant message to skype

Hi all,
   In our application we are having one option for invite users,when i
click invite button then instant message will go to their respective
skype account,i dont know how to send message to skype.If any one knows
about this please reply.My rails version is 2.1.1


You may want to check this out -

This allows you to do it using URIs... otherwise you would need to use
Skype's dlls, I believe.