Skip to content

How Tos

Dan Kerchner edited this page Mar 21, 2018 · 12 revisions

How to start up rails console in the current production configuration

This is currently resulting in a stack trace (similar to https://github.com/rails/rails/issues/16370 - need to chase this down). For now, a workaround is to temporarily edit config/environments/production.rb and set config.eager_load = false. Remember to set it back afterwards. Then type: rvmsudo RAILS_ENV=production rails c

How to delete all items

Recommend doing this via the UI, but rails console method TBD.

How to delete a tombstone

Deleting an item leaves a "tombstone" in the Fedora repository which essentially holds the ID so that it can't be reused in this repository. There may be occasions where we want to delete a tombstone; for instance, when re-loading items with predetermined IDs during migration of items from a previous instance of GW ScholarSpace. This can be accomplished by curling to the Fedora API:

curl -X DELETE "http://<Fedora server URL>:8080/fcrepo/rest/prod/a1/a1/a1/a1/a1a1a1a1/fcr:tombstone" -u fedoraUser:fedoraPassword

where you would substitute the item's ID for a1/a1/a1/a1/a1a1a1a1, and substitute the username and password. If successful, there should be no error or other output at the command line.

How to delete an item via the rails console

How to...