Configuring an OS X Samvera Dev Environment - samvera/hyrax GitHub Wiki
Note: This is intended primarily as a means to share notes prior to the Spring 2017 Hyrax Bootcamp. Consult the README.md for the official steps.
Tested on Ruby 2.3.1 and OS X 10.12.3
Dependencies:
- Imagemagick:
brew install imagemagick --with-openjpeg- run
convert -list formatin terminal and ensure that there is a JP2 entry, imagemagick has been successfully installed with JPEG-2000 support
- LibreOffice and Ghostscript:
- install LibreOffice
brew cask install libreoffice - install ghost script
brew install ghostscript
- install LibreOffice
- FITS
- install fits
brew install fits, note that homebrew currently installs 0.8.6 (which works currently), but Hydra Derivatives is known to be good with up to 1.0.5. To install a newer FITS follow these instructions. - ensure fits is installed (via brew),
fits -vshould show the version number
- install fits
- Redis:
- install:
brew install redis - run:
redis-server - alternatively:
brew services start redisto launch redis on boot
- install:
Installing Hyrax
- clone hyrax:
[email protected]:projecthydra-labs/hyrax.git - enter the folder:
cd hyrax - install gems:
bundle install - generate the test app:
rake engine_cart:generate - enter the test app:
cd .internal_test_app/ - start solr:
solr_wrapper- ensure that
http://127.0.0.1:8983/solr/#/hydra-developmentresolves in your browser
- ensure that
- start fedora:
fcrepo_wrapper- ensure that
http://127.0.0.1:8984/restresolves in your browser
- ensure that
Configuring Hyrax
- ensure you are in the
.internal_test_appdir - configure a workflow:
rails hyrax:workflow:load - configure an admin_set:
rails hyrax:default_admin_set:create - configure fits
- if you installed via homebrew:
- open
config/initializers/hyrax.rband findconfig.fits_path - uncomment that line and change it to read
config.fits_path = "fits"
- open
- if you installed by some other method and
fits.shworks in terminal, no action is needed - if you installed by some other method and neither
fitsnorfits.shworks in terminal, you need to editconfig.fits_path(located inconfig/initializers/hyrax.rb) to point tofits.shin your installation. You may also need to makefits.shexecutable.
- if you installed via homebrew:
- configure background jobs:
- open
config/application.rb - beneath the line
class Application < Rails::Applicationaddconfig.active_job.queue_adapter = :inline
- open
- (optional): if you want to be an admin user
- open
config/role_map.yml - edit your
development:block so that it looks like:
development: archivist: - [email protected] admin: - [email protected] - open
Starting the Application
- if needed start solr, fedora, and redis:
- solr:
solr_wrapper - fedora:
fcrepo_wrapper - redis:
redis-server
- solr:
- launch the application:
- rails web server:
rails s - rails console:
rails c
- rails web server:
- create a new user:
- with the server running visit
http://localhost:3000/users/sign_up?locale=en - create a user whose email address is
[email protected]and use any password you want - you will then be able to log in and self deposit word, you will also have admin rights if you granted them to archivist1 in the optional step above
- with the server running visit
Developing
Go up a level to the hyrax directory and make changes as you would when doing normal rails development, changes should be reflected in your app. Of course you make need to restart the server for some changes to be picked up.