From e4dec2bc26ef55c550c91c329f382bc6f087284b Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 1 Apr 2018 09:51:51 +0200 Subject: Fix bootstrapping vagrant environment. - just start postgresql instead of restarting everything after install. - update setup script to install required ruby version and deps if not installed. - seed database when running the dev:setup rake task. --- script/setup | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/setup b/script/setup index 7823f40..9ddd50b 100755 --- a/script/setup +++ b/script/setup @@ -1,4 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash +ruby_status=$(rbenv version |& awk '{ printf $4 " " $5 " " $6 }'|sed -r 's/[ ]+$//') +echo \"${ruby_status}\" +if [[ "${ruby_status}" == "is not installed" ]] +then + rbenv install $(cat .ruby-version) + gem install bundler + bundle config build.sqlite3 --with-sqlite3-dir=/usr/local +fi + bundle install --without=production if [ $? ]; then -- cgit v1.2.3