Skip to content

Instantly share code, notes, and snippets.

View mark-dce's full-sized avatar

Mark Bussey mark-dce

  • Data Curation Experts
  • Minneapolis, MN
View GitHub Profile
@mark-dce
mark-dce / codex.rb
Created June 16, 2016 16:27
Using `contains` for metadata
class Codex < ActiveFedora::Base
contains 'descMetadata', class_name: 'CodexMetadata'
property :title, delegate_to: 'descMetadata', multiple: false
property :author, delegate_to: 'descMetadata', multiple: false
end
@mark-dce
mark-dce / gist:4eb9d7aac82e96ac61c3faf5e4d716f9
Created November 29, 2017 03:46
ArgumentError in Hyrax::AudiosController#create
ArgumentError in Hyrax::AudiosController#create
Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
Extracted source (around line #30):
def document_url
key = document.model_name.singular_route_key
Rails.application.routes.url_helpers.send(key + "_url", document.id)
end
end
end
@mark-dce
mark-dce / production.log
Created November 9, 2017 16:39
epigaea batch status error
I, [2017-11-09T11:36:00.955163 #30788] INFO -- : [aa9dd1ec-682b-4e10-b245-219826446a14] Started GET "/batches" for 38.89.229.157 at 2017-11-09 11:36:00 -0500
I, [2017-11-09T11:36:00.956361 #30788] INFO -- : [aa9dd1ec-682b-4e10-b245-219826446a14] Processing by Hyrax::BatchesController#index as HTML
D, [2017-11-09T11:36:00.958116 #30788] DEBUG -- : [aa9dd1ec-682b-4e10-b245-219826446a14] User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1
D, [2017-11-09T11:36:00.959877 #30788] DEBUG -- : [aa9dd1ec-682b-4e10-b245-219826446a14] Role Load (0.3ms) SELECT `roles`.* FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 1
D, [2017-11-09T11:36:00.960083 #30788] DEBUG -- : [aa9dd1ec-682b-4e10-b245-219826446a14] Usergroups are ["public", "admin", "registered"]
D, [2017-11-09T11:36:00.961335 #30788] DEBUG -- : [aa9dd1ec-682b-4e10-b245-219826446a14] Role Exists (0.3ms) SELECT 1 AS one FROM `roles` INNE
(byebug) puts response
HandleException (MESSAGE_FORMAT_ERROR) Invalid array size
at net.handle.hdllib.Encoder.readByteArray(Encoder.java:157)
at net.handle.hdllib.Encoder.decodeSiteInfoRecord(Encoder.java:616)
at net.handle.hdllib.Configuration.<init>(Configuration.java:156)
at net.handle.hdllib.Configuration.defaultConfiguration(Configuration.java:31)
at net.handle.hdllib.HandleResolver.<init>(HandleResolver.java:81)
at net.handle.apps.simple.HDLTrace.<init>(HDLTrace.java:27)
at net.handle.apps.simple.HDLTrace.main(HDLTrace.java:85)
Unable to load local cache/resolver site information. Will use global resolution
@mark-dce
mark-dce / stdout
Created June 21, 2017 16:42
MIRA rake db:setup output
$ bundle exec rake db:setup
Database 'mira_development' already exists
Database 'mira_test' already exists
-- create_table("batches", {:force=>:cascade})
-> 0.0121s
-- create_table("bookmarks", {:force=>:cascade})
-> 0.0130s
-- create_table("checksum_audit_logs", {:force=>:cascade})
-> 0.0193s
-- create_table("curation_concerns_operations", {:force=>:cascade})
Blacklight::Exceptions::InvalidRequest in CatalogController#index
RSolr::Error::Http - 400 Bad Request Error: {"responseHeader":{"status":400,"QTime":6,"params":{"facet.field":["names_sim","year_sim","subject_sim","object_type_sim","deposit_method_ssi","qrStatus_sim"],"qt":"search","qf":"id creator_tesim title_tesim subject_tesim description_tesim identifier_tesim alternative_tesim contributor_tesim abstract_tesim toc_tesim publisher_tesim source_tesim date_tesim date_created_tesim date_copyrighted_tesim date_submitted_tesim date_accepted_tesim date_issued_tesim date_available_tesim date_modified_tesim language_tesim type_tesim format_tesim extent_tesim medium_tesim persname_tesim corpname_tesim geogname_tesim genre_tesim provenance_tesim rights_tesim access_rights_tesim rights_holder_tesim license_tesim replaces_tesim isReplacedBy_tesim hasFormat_tesim isFormatOf_tesim hasPart_tesim isPartOf_tesim accrualPolicy_tesim audience_tesim references_tesim spatial_tesim bibliographic_citation_tesim temporal_tesim fu
@mark-dce
mark-dce / gist:7aaede62802adea79ab826a48af23ad8
Created April 20, 2017 04:24
solr_wrapper startup after adding `started?` check to .create
vagrant@camper:~/home/hyrax-demo$ solr_wrapper
Starting Solr 6.5.0 on port 8985 ... Create Options:
options[:persist] true
create_options[:c] hydra-development
client.exists?('hydra-development') true
#<SolrWrapper::Client:0x000000022670a8 @url="http://127.0.0.1:8985/solr/">
url: http://127.0.0.1:8985/solr/
http://127.0.0.1:8985/solr/
^CSolr is shutting down.
vagrant@camper:~/home/hyrax-demo$ solr_wrapper
@mark-dce
mark-dce / gist:0a6bb38adde0d5b7645ed58778158575
Created April 20, 2017 04:17
solr_wrapper startup errors - runs, fails 4x, then runs again successfully with no other activity on VM
vagrant@camper:~/home/hyrax-demo$ solr_wrapper
Starting Solr 6.5.0 on port 8985 ... Create Options:
options[:persist] true
create_options[:c] hydra-development
client.exists?('hydra-development') true
http://127.0.0.1:8985/solr/
^CSolr is shutting down.
vagrant@camper:~/home/hyrax-demo$ solr_wrapper
Starting Solr 6.5.0 on port 8985 ... Create Options:
options[:persist] true
@mark-dce
mark-dce / Gemfile.lock
Last active March 1, 2017 03:51
Fedora 500 exception - catalina log + rails stack dump
GIT
remote: https://github.com/curationexperts/oargun.git
revision: 8d4b556107ca4c042380acb918cffd5b21baaeac
ref: 8d4b556
specs:
oargun (0.0.1)
active-fedora (~> 9.0)
active-triples (>= 0.7.5)
activesupport (~> 4.0)
linked_vocabs (~> 0.2)
@mark-dce
mark-dce / import log
Created June 8, 2016 20:16
import-cylinders on ucsb.curationexperts.com
$ RAILS_ENV=production ./bin/ingest-cylinders /data/metadata-cylinders/cylinders_samples_only_marc.xml /data/objects-cylinders/
Loading environment...
DEPRECATION WARNING: ActiveFedora::SolrQueryBuilder.solr_name is deprecated and will be removed in ActiveFedora 10.0. Use ActiveFedora.index_field_mapper.solr_name instead. (called from solr_name at /opt/alexandria-v2/shared/bundle/ruby/2.3.0/gems/hydra-access-controls-9.8.1/lib/hydra/config.rb:134)
...
DEPRECATION WARNING: ActiveFedora::SolrQueryBuilder.solr_name is deprecated and will be removed in ActiveFedora 10.0. Use ActiveFedora.index_field_mapper.solr_name instead. (called from solr_name at /opt/alexandria-v2/shared/bundle/ruby/2.3.0/gems/hydra-core-9.8.1/app/controllers/concerns/hydra/controller/controller_behavior.rb:37)
Starting import...
2016-06-08T20:13:04+00:00 INFO traject (2.3.1) executing with: `-c lib/traject/audio_config.rb -s files_directory=/data/objects-cylinders/ /data/metadata-cylinders/cylinders_samples_only_marc.xml`
2016-06-08T20:13: