Skip to content

pulibrary/DSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Local Development Basic Setup

  1. git clone git@github.com:pulibrary/DSS.git
  2. cd DSS
  3. asdf install # if you are using asdf
  4. bundle install
  5. yarn install
  6. bundle exec rake servers:start
  7. bundle exec rake db:seed
  8. bundle exec rake dss:solr:update
  9. bundle exec rake dss:solr:index
  10. bundle exec rails s

(You may need to install yarn separately, if you haven't already.)

Making yourself an admin user

  • If you have not yet logged in, bring the rails server up, and log in to the application via the UI
  • Go on the rails console bundle exec rails c
  • Find your user and assign it the role of 'admin'
user = User.find_by(uid: "YOUR_UID")
user.role = 'admin'
user.save!

Production Deployment

Deploy with Capistrano bundle exec cap production deploy or bundle exec cap staging deploy

Reindexing in Production

If you need to re-index you can do either of the following.

bundle exec rake dss:solr:deindex bundle exec rake dss:solr:index

or if you want to re-index one Resource object at a time

bundle exec rake dss:solr:reindex

Running the tests

RAILS_ENV=test bundle exec rake db:setup
bundle exec rspec

Running system specs in the browser

RUN_IN_BROWSER=true bundle exec rspec spec/system