Last Updated: February 25, 2016
·
602
· alii

Rails Vagrant box

Recently, I had a pleasure to work with @kinnaj.
He is a designer and uses Photoshop on Windows.
We were going to work on a Rails project together.

You noticed it right. Windows + Rails = :sweat:

Among all the solutions I thought (including cloud IDE) vagrant was the smoothest.
Building a suitable box is not a problem, but I wanted it to be automated and available inside of our repo.

  1. So, I forked rails/rails-dev-box repo;
  2. Removed MySQL 8fe6b0e;
  3. Made postgres user trusted cb1384b;
  4. Updated ruby version to 2.1.2 4b32caf;
  5. Added aliismayilov/rails-dev-box as a submodule to our Rails project.

Here is the modified part of Vagrantfile from the project:

# ...
  # Use 1GB RAM instead of default < 512MB.
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
  end

  # specify puppet manifest and module files location
  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = 'rails-dev-box/puppet/manifests'
    puppet.module_path    = 'rails-dev-box/puppet/modules'
  end
# ...

Now my collegue had to install VirtualBox and Vagrant.
Run the following commands to be inside of a working vagrant box with Rails+PostgresSQL+Memcached.

> vagrant up
> vagrant ssh
$ cd /vagrant