How to add flex project to rails project?

I'm starting to learn in flex and ruby on rails. I see some projects there is a flex folder which contains controller, models, views. I think it's not mannually to add these folders to rails project.

How to do that?