Created
August 29, 2017 02:19
-
-
Save MyklClason/94a6f4e379b3a1e50fd3a4669513e265 to your computer and use it in GitHub Desktop.
Rails computer cloud9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Delete everything except the hidden .c9 folder | |
# 2. Setup aliases | |
# Setup Postgres database | |
sudo service postgresql start | |
sudo sudo -u postgres psql | |
CREATE USER username SUPERUSER PASSWORD 'password'; | |
\q | |
echo "export USERNAME=username" >> ~/.profile | |
echo "export PASSWORD=password" >> ~/.profile | |
. ~/.profile | |
sudo sudo -u postgres psql | |
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE'; | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
\c template1 | |
VACUUM FREEZE; | |
\q | |
# Run Rails composer. Use above uername and password, don't delete old databases. | |
rails new . -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment