Setting up your development environment
Note This configuration is specific to the development environment at Dartmouth.
Oracle and Postgres require setting environment variables in
~/.bash_profile. Add this to that file before running bundle install:# Oracle Definitions. export ORACLE_BASE=/usr/lib/oracle export ORACLE_HOME=$ORACLE_BASE/12.1/client64 export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH export PATH=$PATH:/usr/lib/oracle/12.1/client64/bin # Sets Characters Oracle is using. export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 # Adding Postgresql commands to PATH. export PATH=$PATH:/usr/pgsql-9.5/binInstall all gem dependencies:
$ bundle installNote If running in production use
bundle install --without development test ciOnce everything is installed, sync the db:
$ rake db:migrateSet environment variables in
.env(a new file may need to be created). See Environment Variables for a description of variables needed.Load organizations, people (faculty) and documents:
$ rake load:allTo write crontab:
$ whenever -wNote This will write the crontab under the current user running this command.
Note If you would like the commands in the crontab to run in a different environment than
development, either use the--setflag available inwheneveror set the rails environment before running the commandRAILS_ENV=qa whenever -w.To seed db (with roles and privileges for developers and other admins):
$ rake db:seed