You can use WebORB or RubyAMF, or just plain XML - Rails is pretty smart when it comes to XML, with a few gotchas here and there.
We use XML to speak between our Rails apps and our Flex web application, almost exclusively. It's pretty simple.
For retrieving data from your Rails app, just create an HTTPService with result_type of e4x, and call your url. In your rails controller, do something like:
def people
render :xml => Person.all.to_xml
end
Sometimes, Rails will add the tag to the end. If this happens, change your controller to:
def people
render :xml => Person.all.to_xml.target!
end
If you want to send data to your Rails app, it's just as easy..
<mx:HTTPService id="theservice" url="http://localhost:3000/svc/add_person" method="POST">
<mx:request>
<person>
<first>Firstname</first>
<last>Lastname</last>
</person>
</request>
</HTTPService>
and in your controller:
def add_person
p=Person.create(params[:person])
render :xml => {:result => "Success"}.to_xml.target!
end