Forked from naveedshahzad/Setup Parliamentary Questions
Created
April 19, 2016 23:00
-
-
Save johnfelipe/68e3540c0f2e42e6eb4cdb188ee073fc to your computer and use it in GitHub Desktop.
This file contains 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
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
sudo vi /etc/resolv.conf | |
comment all lines and add following line at the end | |
nameserver 8.8.8.8 | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default | |
git config --global color.ui true | |
git config --global user.name "YOUR NAME" | |
git config --global user.email "YOUR@EMAIL.com" | |
ssh-keygen -t rsa -C "YOUR@EMAIL.com" | |
The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command and paste it here https://github.com/settings/ssh. | |
cat ~/.ssh/id_rsa.pub | |
ssh -T git@github.com | |
git clone git@github.com:ministryofjustice/parliamentary-questions.git | |
cd parliamentary-questions/ | |
echo 2.1.2>.ruby-version | |
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list" | |
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install postgresql-common | |
sudo apt-get install postgresql-9.3 libpq-dev | |
bundle install | |
sudo -u postgres psql | |
alter user postgres password 'apassword'; | |
\q | |
edit config/database.yml and supply username postgres and password apassword to development and test configuration blocks | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install nodejs | |
PQ_REST_API_HOST="http://localhost:3000" rake db:setup | |
PQ_REST_API_HOST="http://localhost:3000" rake "user:create[admin@admin.com, 123456789, admin]" | |
PQ_REST_API_HOST="http://localhost:3000" rails s -b 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment