Using a virtual machine
So far, we have seen how to install Ruby on our own local machine, that is, the machine we use daily for work. This is the best way to install Ruby when starting out, but once you start working on more complex applications and with other developers, you will want to have consistency in the behavior of everyone’s local environments.
Why, you may ask? The simple answer is that we want to avoid the dreaded phrase that all developers have either heard or even used at some point in our careers: “It works on my machine.” What is important to remember is that every local environment is different, from the processor to the OS version and Ruby version, and this can get in the way of more important work.
As an example that I personally experienced, we once wasted almost a week when we deployed a PHP application to a Linux server that was developed on Windows local machines. The problem was that one of the developers forgot that Windows (at the...