You can follow the below steps to do so:
1. First Containerized your Ruby code.
2. Put the image in a repository like (DockerHub etc.)
3. Then, Create a task definition in ECS
4. Now, Create an ECS cluster.
5. Create a Service to run your task.
Hope this helps!!
Want to learn more about AWS? Come & join: AWS Certification