These run commands should be consolidated into a single line, and the ruby --version should be removed, or replaced with a test. It may be beneficial to place this in a separate script that gets added and then executed. Using a script would allow easily exiting with a useful message if something doesn't complete as expected.