
I installed the text-only browser Lynx so I can troubleshoot Apache locally. On rails-dev-box-deploy, I created a git repo for Capistrano to use. On the first VM, I also changed the configuration and assigned this VM an IP from DHCP as well. I used port 3030 instead so I can test this new VM in isolation. I changed the hostname (line 5), used DHCP to assign the IP address (line 7), and also changed the forwarded port (line 8). provision :shell, path: 'bootstrap.sh', keep_color: true config. network :forwarded_port, guest: 3030, host: 3030 config. network "private_network", type: "dhcp" config. hostname = 'rails-dev-box-deploy' config. # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant. I cloned the rails-dev-box Github project to another directory on the Mac, and modified the new Vagrantfile: To simulate deploying the app using Capistrano, I created a private network using two rails-dev-box VMs. Pushing and pulling from Github worked in either OS.


I was able to edit my files in either the host or guest machine, although adding or removing files from the Mac resulted in. It specifies that port 3000 is forwarded to the guest OS. The Vagrantfile file on the rails-dev-box directory contains the network configuration for the VM. Specifying 0.0.0.0 allows the VM to bind to every available network interface. I needed to use bin/rails server -b 0.0.0.0 before I could browse to on my Mac’s Chrome and Firefox browsers.

I proceeded to create a Rails 5 app on /vagrant, which is mapped to the rails-dev-box directory on the host machine. Developing in the VMįollowing the setup instructions on the rails-dev-box Github page, I accessed the VM using vagrant ssh. In addition, Apache is already installed on the guest OS (Ubuntu), which is a bonus because I can simulate deploying to, and running on, a production environment. Although the project’s README explicitly says that the VM is meant for Rails core development, it comes with MySQL, PostgreSQL, and Ruby 2.3. I used the rails-dev-box VM created by members of the Rails team. I experienced issues after updates, and had to spend evenings fixing package issues and OpenSSL problems. One of my goals is to avoid updating Homebrew. I recently spent time developing a toy Rails 5 app using a Vagrant box.
