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 https://gist.githubusercontent.com/billdueber/3ed639846c3fb1783e89c0a2e1abb166/raw/d18dd0c5c486d96b47d8b49fae593d6a4b20da07/hyrax_template
Watch the world go by.
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: http://127.0.0.1:3000/users/sign_up?locale=en
- 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-leveladmin
key underdevelopment
development: ... admin: - my_fake_user@faker.com
- Shutdown the server (in the window you ran
- 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 http://0.0.0.0:3000 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.