From 36e29b82c8f1364a09128c771211a8daf9557a35 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sat, 21 Jul 2018 10:20:28 -0500 Subject: [PATCH] Add a script to bring up a console In addition to following the 'scripts to rule them all' pattern, this makes it easier to pull up a console by abstracting all the docker things away and will prevent a change to the binstubs from being able to run a rails console. --- script/console | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 script/console diff --git a/script/console b/script/console new file mode 100755 index 00000000..ff671891 --- /dev/null +++ b/script/console @@ -0,0 +1,7 @@ +#!/bin/sh + +appdir=$(cd $(dirname "$0")/.. && pwd) +[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@ + +export RAILS_ENV='development' +bin/rails console