You certainly won't need anything installed other than Docker to create Ruby apps...
The idea is to mount the current folder into a temporary Ruby container using the official Ruby image from Docker Hub, then install Rails inside this temporary container, and then create the project skeleton using the rails new
command.
# Start bash inside a Ruby container: