Rails and Wordpress session integration

Hi,

I’m having a lot of difficulties integrating WP and Rails sessions.
Basically what I need is when a user sign in on my Rails application, he
must be automatically logged on WP blog and vice-versa.

I’ve tried Single Sign-on solutions like CAS but it didn’t worked. I’m
using Rails 3.1 and devise for auth.

Thanks in advance,
Gustavo