You can't do without Docker.
docker run --rm -it --workdir /app/ --volume $PWD:/app/ ruby:2.6.3 bash -c "gem install rails -v 5.2.4 && rails new sample_project"
that's all.
Recommended Posts