Instantly share code, notes, and snippets.

What would you like to do?

Install using a template:

This is slighly different in that it installs the gems inside the app directory in yourappname/.bundle and uses native libxml2 to compile nokogiri.

$ ruby -v # need a 2.3 or later
   => 2.4.0
$ rails -v # 
   => 5.0.2

If you don't have rails (or don't have the right verison of rails), do gem install rails.

Then, create the new project (I call mine "thyrax", for "test hyrax")

rails new thyrax -B -m

Watch the world go by.

Post-template installation instructions

Wait! There's still work to do!

First, we need to create a new admin set. This requires the servers to be running.

  • Go to a second terminal and fire them up:
  cd whereever/thyrax # or whatever you called it
  bundle exec rake hydra:server

(this will take a lot of time, since it'll download solr and fedora and stuff)

  • Then, after the servers are running, create the admin set
  # again, from within the thyrax dir
  bundle exec rake hyrax:default_admin_set:create
  • Now make a new user in the web interface:
  • Make that user an admin.
    • Shutdown the server (in the window you ran bundle exec rake hydra:server do a ^C.)
    • Edit config/role_map.yaml and add your user as an admin. NOTE: You'll probably have to add the top-level admin key under development
  • Start up the server again: bundle exec rake hydra:server. It'll be faster this time since it doesn't have to download everything.
  • Go to and log in using the link in the upper-right.

If it all worked, you should be able to see and click on an "Administration" menu, then the "Administrative Sets" link and you should see a "Default Admin Set" link. Click that and then click "Edit". Click "Workflow". That's what we're going to be talking about a lot on Monday.

gem 'hyrax', '1.0.0.rc1'
say_status :bundler_config, "Going to build nokogiri with system libraries"
ENV['BUNDLE_BUILD__NOKOGIRI'] = "--use-system-libraries"
say_status :bundler_config, "Running bundler"
run 'bundle install --path=./.bundle'
generate 'hyrax:install', '-f'
rails_command 'db:migrate'
rails_command 'hyrax:workflow:load'
generate :"hyrax:work", "Work"
say_status "More to do!", "Continue with the instructions at"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment