Closed SECONDSITE closed 11 years ago
I'm trying to get the databases set up. After running
rake db:setup rake db:schema:load rake thinking_sphinx:configure rake thinking_sphinx:index rake thinking_sphinx:start rails r tools/load_sources.rb
I try to run:
rails r tools/load_iconic_taxa.rb
But I get a lot of "uninitialized constant Taxon::RANKS" errors:
Warning: Error loading /var/www/html/app/models/observation_field_value.rb: uninitialized constant Taxon::RANKS /var/www/html/app/models/observation.rb:166:in `<class:Observation>' /var/www/html/app/models/observation.rb:2:in `<top (required)>' /var/www/html/app/models/observation_field_value.rb:13:in `<class:ObservationFieldValue>' /var/www/html/app/models/observation_field_value.rb:1:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:230:in `block in constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in `constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/core_ext/string/inflections.rb:54:in `constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:64:in `block (2 levels) in load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:54:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:54:in `block in load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:53:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:53:in `load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:15:in `prepare' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:81:in `block in context' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:78:in `synchronize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:78:in `context' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/active_record.rb:162:in `define_index' /var/www/html/app/models/taxon.rb:51:in `<class:Taxon>' /var/www/html/app/models/taxon.rb:2:in `<top (required)>' tools/load_iconic_taxa.rb:10:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `eval' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' Warning: Error loading /var/www/html/app/models/observation.rb: uninitialized constant Taxon::RANKS /var/www/html/app/models/observation.rb:166:in `<class:Observation>' /var/www/html/app/models/observation.rb:2:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:230:in `block in constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in `constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.14/lib/active_support/core_ext/string/inflections.rb:54:in `constantize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:64:in `block (2 levels) in load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:54:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:54:in `block in load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:53:in `each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:53:in `load_models' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/context.rb:15:in `prepare' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:81:in `block in context' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:78:in `synchronize' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx.rb:78:in `context' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/active_record.rb:162:in `define_index' /var/www/html/app/models/taxon.rb:51:in `<class:Taxon>' /var/www/html/app/models/taxon.rb:2:in `<top (required)>' tools/load_iconic_taxa.rb:10:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `eval' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' Adding Animalia... Making the taxon iconic... Saving the taxon... /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/relation/finder_methods.rb:313:in `find_with_ids': Couldn't find TaxonName without an ID (ActiveRecord::RecordNotFound) from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/relation/finder_methods.rb:107:in `find' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/querying.rb:5:in `find' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/persistence.rb:292:in `block (2 levels) in reload' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/scoping/default.rb:41:in `block in unscoped' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/relation.rb:241:in `block in scoping' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/scoping.rb:98:in `with_scope' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/relation.rb:241:in `scoping' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/scoping/default.rb:41:in `unscoped' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/persistence.rb:292:in `block in reload' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/identity_map.rb:72:in `without' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/persistence.rb:291:in `reload' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:44:in `reload' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.14/lib/active_record/autosave_association.rb:226:in `reload' from /var/www/html/lib/ratatosk/lib/ratatosk/model_adapter.rb:23:in `method_missing' from tools/load_iconic_taxa.rb:46:in `block in <top (required)>' from tools/load_iconic_taxa.rb:39:in `each' from tools/load_iconic_taxa.rb:39:in `<top (required)>' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `eval' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands/runner.rb:52:in `<top (required)>' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `require' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.14/lib/rails/commands.rb:64:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>'
Try pulling again. I think I addressed a lot of these issues in d3c11ce02420256dde252c11db58a762d70645d2.
I'm trying to get the databases set up. After running
I try to run:
But I get a lot of "uninitialized constant Taxon::RANKS" errors: