Skip to content

Instantly share code, notes, and snippets.

@naveedshahzad
Last active April 19, 2016 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save naveedshahzad/78bfc708840b5a9f626710819cb860e9 to your computer and use it in GitHub Desktop.
Save naveedshahzad/78bfc708840b5a9f626710819cb860e9 to your computer and use it in GitHub Desktop.
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