Skip to content

uclibs/ucrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scholar@UC

Services Health Travis (.org) branch Coveralls coverage CircleCI Coverage Status

Dependencies

***Our Hyrax 2.x based app requires the following software to work:

  • Solr version >= 5.x (tested up to 6.2.0)
  • Fedora Commons digital repository version >= 4.5.1 (tested up to 4.6.0)
  • A SQL RDBMS (MySQL, PostgreSQL), though note that SQLite will be used by default if you're looking to get up and running quickly
    • libmysqlclient-dev (if running MySQL as RDBMS)
    • libsqlite3-dev (if running SQLite as RDBMS)
  • Redis, a key-value store
  • ImageMagick with JPEG-2000 support
  • FITS version 1.0.x (1.0.5 is known to be good)
  • LibreOffice

Installing the Scholar application

  1. Clone this repository: git clone https://github.com/uclibs/ucrate.git ./path/to/local

    Note: Solr will not run properly if there are spaces in any of the directory names above it
    (e.g. /user/my apps/ucrate/)

  2. Change to the application's directory: e.g. cd ./path/to/local
  3. Make sure you are on the develop branch: git checkout develop
  4. Install bundler (if needed): gem install bundler -v 2.4.22
  5. Run bundler: bundle install Apple Silicon (M1–M4) Users with MySQL 9: mysql2 Build Fix If you're using MySQL 9+ on Apple Silicon, mysql2 needs to be compiled with additional flags due to missing default linker paths (e.g. for zstd).
    bundle config build.mysql2 \
      "--with-ldflags='-L/opt/homebrew/opt/mysql/lib -L/opt/homebrew/opt/zstd/lib' \
      --with-cppflags='-I/opt/homebrew/opt/mysql/include -I/opt/homebrew/opt/zstd/include'"
    
    Then run: bundle install
  6. Apple Silicon (M1–M4) Fedora note:
    • Install the Java 8 runtime once (Temurin ARM build):
      brew install --cask temurin@8
      
  7. Start fedora: fcrepo_wrapper -p 8984
  8. Apple Silicon (M1–M4) Fedora note:
    • When starting Fedora, point that terminal tab at Java 8 before running the wrapper:
      export JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home"
      export PATH="$JAVA_HOME/bin:$PATH"
      fcrepo_wrapper -p 8984
      
    • Only the Fedora tab needs these exports; other tabs can keep the default JDK.
  9. Start solr in new tab: solr_wrapper -d solr/config/ --collection_name hydra-development
  10. Start redis in new tab: redis-server
  11. Run the database migrations: bundle exec rake db:migrate
  12. Start the rails server in new tab: rails server
  13. Visit the site at [http://localhost:3000] (http://localhost:3000)
  14. Create default admin set: bin/rails hyrax:default_admin_set:create
  15. Create default collection: bundle exec rails hyrax:default_collection_types:create
  16. Load workflows: bin/rails hyrax:workflow:load
    • Creating default admin set should also load the default workflow. You can load, any additional workflows defined, using this command.
  17. Assigning admin role to user from rails console:
    • admin = Role.find_or_create_by(name: "admin")
    • admin.users << User.find_by_user_key( "[email protected]" )
    • admin.save
    • Read more.

Running the Tests

  1. Start fedora: fcrepo_wrapper -p 8080
  2. Apple Silicon (M1–M4) Fedora note:
    • When starting Fedora for tests, point that terminal tab at Java 8 before running the wrapper:
      export JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home"
      export PATH="$JAVA_HOME/bin:$PATH"
      fcrepo_wrapper -p 8080
      
    • Only the Fedora tab needs these exports; other tabs can keep the default JDK.
  3. Start solr: solr_wrapper -d solr/config/ --collection_name hydra-test -p 8985
  4. Start redis: redis-server
  5. Run the database migrations: bundle exec rake db:migrate (Optional)
  6. Run the test suite: bundle exec rake spec

Check for vulnerabilities

  1. Run brakeman: bundle exec brakeman -q -w 2
  2. Run bundler-audit: bundle-audit check --update

Project Samvera

This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website

Samvera Logo

About

Scholar@UC: University of Cincinnati's self-submission institutional repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 14