Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing MARC records step fails in Quickstart guide #3081

Open
mephillips-durham opened this issue Sep 19, 2023 · 1 comment
Open

Indexing MARC records step fails in Quickstart guide #3081

mephillips-durham opened this issue Sep 19, 2023 · 1 comment

Comments

@mephillips-durham
Copy link

In the section for Easy or Hard: After creating your new application I was able to start Solr using solr_wrapper. I was able to access the Solr web interface. I then tried the "Index some data" step and got this error:

vagrant@ubuntu-jammy:~$ cd projects/search_app/
vagrant@ubuntu-jammy:~/projects/search_app$ rake solr:marc:index_test_data
rake aborted!
LoadError: cannot load such file -- /home/vagrant/projects/search_app/app/models/marc_indexer
<internal:/home/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/home/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
Tasks: TOP => solr:marc:index:work
(See full trace by running task with --trace)

The /home/vagrant/projects/search_app/app/models/marc_indexer file does not seem to be present. Searching using find from the home directory I can see these are present:

vagrant@ubuntu-jammy:~$ find . | grep marc_indexer
./.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/traject-3.8.1/lib/traject/indexer/marc_indexer.rb
./.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/blacklight-marc-8.1.0/lib/generators/blacklight/marc/templates/app/models/marc_indexer.rb

Is there a fault with the rake task for index_test_data or should I be located in a different directory to run the command, perhaps?

I followed the Creating a new application the easy way. I see the "hard way" instructions include rails generate blacklight:install --devise --marc --solr_version=latest to generate blacklight-marc into the application, so perhaps that is missing from the easy method? I checked here and there seems to be something about including blacklight-marc in the easy method. (Though I don't fully understand the ENV.fetch and whether it will take the --devise and --marc options or not.)

@bess
Copy link
Member

bess commented Feb 28, 2024

I can confirm this bug on a mac, newly generated blacklight application, using lando for solr:

be rake solr:marc:index_test_data
rake aborted!
ArgumentError: Traject::SolrJsonWriter: Neither solr.update_url nor solr.url set; need at least one (ArgumentError)

      raise ArgumentError.new("#{self.class.name}: Neither solr.update_url nor solr.url set; need at least one")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/bess/.asdf/installs/ruby/3.2.0/bin/bundle:25:in `load'
/Users/bess/.asdf/installs/ruby/3.2.0/bin/bundle:25:in `<main>'
Tasks: TOP => solr:marc:index:work
(See full trace by running task with --trace)

I will see if I can figure it out.

@bess bess self-assigned this Feb 28, 2024
@bess bess removed their assignment Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants