An open API service indexing awesome lists of open source software.

https://github.com/fmaclen/vagrant-on-rails

A Vagrantfile + Provision script to install Rails 6 and common dependencies
https://github.com/fmaclen/vagrant-on-rails

provision-script rails vagrant

Last synced: about 2 months ago
JSON representation

A Vagrantfile + Provision script to install Rails 6 and common dependencies

Awesome Lists containing this project

README

          

# vagrant-on-rails
A Vagrantfile + Provision script to install Rails 6 and common dependencies.

# What's Included
- Ubuntu 20.04 (Focal)
- NodeJS 14.16.0
- Yarn 1.22.5
- rbenv 1.1.2
- Ruby 3.0.0
- Rails 6.1.3
- PostgreSQL 12.6
- Redis 6.0.6

# Creating Rails app
During provision, a PostgreSQL user `vagrant` with `superuser` role will be created for the databases: `vagrant_test` and `vagrant_development`.
After provision is finished, enter the VM with `vagrant ssh`, it should automatically put you in the `/vagrant` directory. At this point simply run `rails new . --database=postgresql`.

To reach the Rails server from your host machine simply run `rails s -b 0.0.0.0` and point your browser to `http://192.168.55.200:3000`

Rails 6.1.3 / Ruby 3.0.0

# Things to consider
I put together the provision script based on a few others I found on GitHub and [elsewhere](https://gorails.com/setup/ubuntu/18.04).

Since I'm not super "fluent" in `bash` and `vagrant` I'm pretty sure this script can be optimized a significant amount, **if you feel like giving it a shot just do a pull request and I'll be happy to take a look at it.**

Needless to say, feel free to also remove things you don't want installed. I separated the provision script with comments so it shouldn't be hard to figure out.