Skip to content

Instantly share code, notes, and snippets.

@lealeelu
Last active March 23, 2017 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lealeelu/8c36f9dd6981cc7b79f0fc10fc75fc1a to your computer and use it in GitHub Desktop.
Save lealeelu/8c36f9dd6981cc7b79f0fc10fc75fc1a to your computer and use it in GitHub Desktop.
Hyrax install instructions for Lubuntu

Install RVM and rails

  • sudo apt install curl

  • curl -sSL https://get.rvm.io | bash -s stable --rails

  • source /home/hyrax/.rvm/scripts/rvm

  • add to your .bashrc

### Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  • rvm install 2.3
  • ruby -v

Install and start redis

  • sudo apt install redis-server
  • sudo service redis start

Install Fits

  • sudo apt install default-jre
  • wget http://projects.iq.harvard.edu/files/fits/files/fits-0.8.5.zip
  • unzip fits-0.8.5.zip
  • mv fits-0.8.5 /usr/local/
  • ln -s /usr/local/fits-0.8.5 /usr/local/fits
  • cd /usr/local/fits/
  • chmod a+x fits.sh
  • ./fits.sh -h #make sure it works
  • I added fits to my path in bashrc instead of adding it to config/initializers/hyrax.rb
export PATH="$PATH:$HOME/.rvm/bin:/usr/local/fits:$HOME/.rvm/scripts/rvm"

Install other required packages

  • sudo apt install imagemagick libreoffice nodejs phantomjs

Setup and configure Hyrax

(This is pretty much going to be a copy paste of from here on of this: https://github.com/projecthydra-labs/hyrax/wiki/Configuring-an-OS-X-Hydra-Dev-Environment#installing-hyrax)

  • git clone git@github.com:projecthydra-labs/hyrax.git
  • cd hyrax/
  • gem install bundler
  • rake engine_cart:generate #generates your internal test app
  • cd .internal_test_app/
  • bundle install
  • rake hydra:server

go to localhost:3000 and see if things are running

Running Spec Tests

gem install rspec # if you haven't already

I had to start the test servers a little differently than the normal servers, because the spec tests are looking at differrent ports.

cd .internal_test_app
solr_wrapper -v --config solr_wrapper_test.yml #keep running, go into new tab
fcrepo_wrapper -v --config fcrepo_wrapper_test.yml #keep running, go into new tab
rails s
rails generate rspec:install
rspec spec/<blah blah>/<blah>.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment