Vagrant VM for starting a Rails project

This is something off-topic for this blog, but after spending several hours setting up an environment for developing and testing a Ruby on Rails project, I’d like to share my solution.

I recently had an idea for a small web-project, for that I’d like to use Ruby on Rails. From previous attempts of using Rails, I knew that Ruby and Rails are updated regularly and that the setup of the environment might be tricky. And using my Mac not only for web-development, I did not want to have many versions of Ruby, Python, whatnot, in parallel on it. And as I read about Vagrant some weeks ago, I wanted to give it a try.

It took quite some time to set-up the provisioning script properly. I tried using Chef, but it made things more complex and I appreciated the simplicity of a shell script.