Open atz opened 9 years ago
Error is: NameError: uninitialized constant Solrizer::FieldMapper::DateTime
Example:
2.1.2 :005 > Solrizer.default_field_mapper.solr_names_and_values("foobar", "xyz", [:searchable, :facetable, :displayable]) NameError: uninitialized constant Solrizer::FieldMapper::DateTime from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:168:in `extract_type' from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:204:in `block (2 levels) in solr_names_and_values' from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:201:in `each' from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:201:in `block in solr_names_and_values' from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:200:in `each' from /Users/atz/.rvm/gems/ruby-2.1.2/gems/solrizer-3.3.0/lib/solrizer/field_mapper.rb:200:in `solr_names_and_values' from (irb):5 from /Users/atz/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>' 2.1.2 :006 > require "date" => true 2.1.2 :007 > Solrizer.default_field_mapper.solr_names_and_values("foobar", "xyz", [:searchable, :facetable, :displayable]) => {"foobar_teim"=>["xyz"], "foobar_sim"=>["xyz"], "foobar_ssm"=>["xyz"]}
See: https://github.com/projecthydra/solrizer/blob/master/lib/solrizer/field_mapper.rb#L168
Note: Code works as long as date is loaded (which probably conceals the bug in most environments).
A similar error could also be elicited from default_descriptors.rb. Add require 'date' to both classes (or base class?) to resolve.
default_descriptors.rb
require 'date'
Error is: NameError: uninitialized constant Solrizer::FieldMapper::DateTime
Example:
See: https://github.com/projecthydra/solrizer/blob/master/lib/solrizer/field_mapper.rb#L168
Note: Code works as long as date is loaded (which probably conceals the bug in most environments).
A similar error could also be elicited from
default_descriptors.rb
. Addrequire 'date'
to both classes (or base class?) to resolve.