Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Setup Unix

Sheean Spoel edited this page Jun 13, 2018 · 9 revisions

Scribe Setup in Unix

  1. Install git:
sudo apt-get update
sudo apt-get install git
  1. Install & start mongodb:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongodb start
  1. Install RVM & Ruby:
sudo apt-get install curl
\curl -sSL https://get.rvm.io | bash
source /home/`whoami`/.rvm/scripts/rvm
rvm requirements
rvm install 2.1.5
rvm use 2.1.5 --default

Note: You may need to run rvm get master if the installation fails because of an OpenSSL-compatibility issue.

  1. Install Node:
sudo apt-get install nodejs
sudo apt-get install npm
npm config set registry http://registry.npmjs.org/

Note: You may need to also install nodejs-legacy if contextify node module fails to install because it is looking for node instead of nodejs

  1. Clone project:
cd /my/projects/folder
git clone https://github.com/zooniverse/scribeAPI.git
cd scribeAPI
  1. Setup gems and modules:
gem install bundle # if you don't already have it
bundle
npm install
  1. Setup your project (replace 'PROJECT_KEY' with the name of your project e.g. 'emigrant')

    rake project:load['PROJECT_KEY']

  2. Set DEVISE_SECRET_TOKEN environment variable to a random string 128 characters long export DEVISE_SECRET_TOKEN='3deb3d80d4a9c4bbcfc988f5b86ed69ec916ada1b4aeb1872e345fc4a7c07ee4c05127bed9e76e21f0f02feedcb6e16eb826d894820f4e338566cad73f39eded'

  3. Set SECRET_KEY_BASE_TOKEN environment variable to a random string 30 characters long export SECRET_KEY_BASE_TOKEN='PSNR5QBQdQSradjbwd3gakE4Z6suhh'

  4. Run the server: rails s, and go to http://localhost:3000 in your browser

Next step: Creating Your Project