Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (37 sloc) 1.76 KB
# -*- mode: ruby -*-
# vi: set ft=ruby : do |config| = "quantal64-rails-2013-01-02"
config.vm.box_url = ""
config.vm.host_name = "rails-box"
# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks. :hostonly, ""
# Assign this VM to a bridged network, allowing you to connect directly to a
# network using the host's network device. This makes the VM appear as another
# physical device on your network.
# :bridged
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port 8080, 8080
# Configure VM to use 1.5gb of ram and 3 cpus
config.vm.customize [
"modifyvm", :id,
"--memory", 1536,
"--cpus", "3"
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
config.vm.provision :shell, :inline => %[
databases=( <%= app_const_base.underscore %> <%= app_const_base.underscore %>_development <%= app_const_base.underscore %>_test )
for db in ${databases[@]}; do
if ! $(sudo -u vagrant psql --list | grep -q $db); then
sudo -u vagrant createdb $db;