This is a Vagrant VM to run ruby projects. It includes:
- Ruby 2.3
- Postgres 9.4
- Nginx with Passenger
- Install Vagrant
cd path_to_vagrant_ruby
vagrant up
- A suggestion is to create a new git branch to update configs for your project:
git checkout my-project
-
Update your Vagrantfile shared folders on the
Configure shared folder
section. This will make your host machine files enabled on the guest VM. If the default filesystem is too slow for you, you can try other Vagrant options. -
For web projects, setup an Nginx config to load your site (see the Nginx details section below).
-
The Vagrant VM is configured to run on the private IP
192.168.68.8
by default. To access your site from the host machine, go tohttp://192.168.68.8
. You can configure your/etc/hosts
for a friendlier name, or checkdnsmasq
for more advanced setups (like automatic subdomain support).
A vagrant
superuser is created for Postgres with password vagrant
.
To add a Passenger site to Nginx, create a file like /etc/nginx/sites-enabled/my-site
, with
the content from scripts/templates/nginx/app.example.conf
adapted to your site, and restart nginx.