This project automates the setup of a development environment for Ruby on Rails core development. This is the easiest way to build a box with everything ready to start hacking on your pull request, all in an isolated virtual machine.
The virtual machine runs on top of VirtualBox.
We use Vagrant to build and provision the virtual machine:
gem install vagrant
Please install the "precise32" base box if you don't have it already (
vagrant box list would tell you):
vagrant box add precise32 http://files.vagrantup.com/precise32.box
That's done only once.
Building the virtual machine is this easy:
git clone https://github.com/rails/rails-dev-box.git cd rails-dev-box vagrant up
This initial setup takes about 3 minutes in my MacBook Air. Once the installation has finished, you can access the virtual machine with
Port 3000 in the host computer is forwarded to port 3000 in the virtual machine. Thus, applications running in the virtual machine can be accessed via localhost:3000 in the host computer.
SQLite3, MySQL, and Postgres
System dependencies for nokogiri, sqlite3, mysql, mysql2, and pg
Databases and users needed to run the Active Record test suite
Once you are done just log out with
^D and suspend the virtual machine
then, resume to hack again
to shutdown the virtual machine, and
to boot it again.
And to completely wipe the virtual machine from the disk destroying all its contents:
vagrant destroy # DANGER: all is gone
Please check the Vagrant documentation for more information on Vagrant.