-
Notifications
You must be signed in to change notification settings - Fork 8
Development Environment Setup
If you haven't already, you will need to set up your computer for Rails development. We highly recommend Mac or Linux over Windows as a development environment.
Install RVM (see https://rvm.io/rvm/install/ for the latest - steps below may change over time)
curl -L get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
Find the requirements (and follow the instructions):
rvm requirements
Install Ruby 1.9.3
rvm install ruby-1.9.3-p194
Install PostgreSQL (Centos)
sudo yum install postgresql postgresql-server postgresql-devel
sudo /etc/init.d/postgresql start
Install PostgreSQL (Mac)
We recommend using Homebrew
brew install postgresql
Local Package Setup
Install gd, libffi, openldap, ImageMagick
then follow the instructions it provides
You'll also need to set up OpenLDAP. See Setting up OpenLDAP for more information.
Create a gemset in RVM
rvm use ruby-1.9.3-p194@acdata --create
Install bundler
gem install bundler
Clone your fork of the repository
(make sure you have git installed)
git clone git@github.com:IntersectAustralia/acdata.git
cd acdata
(and accept .rvmrc)
Install required gems
bundle install
Setup your PostgreSQL user
sudo su - postgres
createuser -P acdata
$ => Enter password for new role: acdata
$ => Enter it again: acdata
Shall the new role be a superuser? (y/n) y
createdb acdata-dev
createdb acdata-test
Before continuing, check that the file /data/acdata_deploy_config.yml exists. If it doesn't, sudo create it and copy the contents of config/acdata_deploy_config_template.yml into it.
Create database schema, run seed and populate scripts (creates test data in local dev environment)
bundle exec rake db:setup
bundle exec rake db:seed db:populate
Update the deploy config.
This file should be located in /data/acdata_deploy_config.yml
eln_url:
eln_uid:
nmr: # provide details of the NMR FTP server
ftp_host:
ftp_user:
ftp_password:
download_dir: # the local folder where NMR folders from the FTP server will be copied to
aperio_mock: true
aperio:
base_url:
project_list_url: # The url should link to the page that lists the projects along with their ACData IDs
export_data_url: # The url should link to where you can export CSVs for the Project table
slide_thumbnail_url: # The url should provide the parameters that gives the slide thumbnail from the Aperio imageserver
label_thumbnail_url: # The url should provide the parameters that gives the label thumbnail from the Aperio imageserver
username: # the account will hold all the slide datasets that are synced between ACData and the Aperio server
password:
instrument_name:
slide_file_type:
label_file_type:
dataserver: # details of the Aperio data server for syncing projects from ACData to the Aperio server
url:
port:
Start up a local server, then have a look around at http://localhost:3000
rails s
you can log in with your email address and Pass.123 (assuming your email is one of georgina, sq, diego, raul)
If you encounter problem with tmpdir for local LDAP ladle when using ubuntu, please modify ladle.rb class to include tmpdir in the configuration.
$ladle = Ladle::Server.new(
:port => 3897,
:ldif => "lib/ladle/sample_data.ldif",
:domain => "dc=localhost",
:tmpdir => "{YOUR_TMP_DIR}"
)