We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5868eff commit 0b2e80aCopy full SHA for 0b2e80a
bin/setup-codespaces
@@ -0,0 +1,23 @@
1
+#!/bin/sh
2
+
3
+set -e
4
5
+if [ -z "$ZSH_VERSION" ] && [ -z "$BASH_VERSION" ]; then
6
+ echo "This script must be sourced. Please run with 'source bin/setup-codespaces'."
7
+ exit 1;
8
+fi
9
10
+rvm install $(cat .ruby-version)
11
+rvm --default use $(cat .ruby-version)
12
+ruby -v
13
14
+docker run -d -i --name postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres
15
+export DATABASE_URL=postgresql://postgres:@localhost
16
17
+# Create config/database.yml
18
+./bin/setup
19
+# Setup & Create .env
20
21
+RAILS_ENV=test bundle exec rake db:setup dev:prime
22
23
+echo "" >> .env && echo "DATABASE_URL=postgresql://postgres:@localhost" >> .env
0 commit comments