blacklight
blacklight copied to clipboard
Quickstart guide not currently working
Tried to follow Blacklight quickstart at https://github.com/projectblacklight/blacklight/wiki/Quickstart
The app created is using Rails 6.0.2.1, and Blacklight 7.6.0.
On booting it with rails server, and trying to access http://locahost:3000/catalog, i get this error:
NameError (uninitialized constant Blacklight::Solr::Document::Marc
Did you mean? Blacklight::Marc):
app/models/solr_document.rb:7:in `<class:SolrDocument>'
app/models/solr_document.rb:2:in `<top (required)>'
Since that looks like a dev-mode auto-loading kind of error, and those sometimes behave differently on second request, I tried refreshing the page... and got a different error:
ActionView::Template::Error (Asset `application.js` was not declared to be precompiled in production.
Declare links to your assets in `app/assets/config/manifest.js`.
//= link application.js
and restart your server):
12: <%= opensearch_description_tag application_name, opensearch_catalog_url(format: 'xml') %>
13: <%= favicon_link_tag %>
14: <%= stylesheet_link_tag "application", media: "all" %>
15: <%= javascript_include_tag "application" %>
16: <%= csrf_meta_tags %>
17: <%= content_for(:head) %>
18: </head>
These problems appear to be Rails version related.
Following the quickstart with Rails 5.2.4.1 (by running rails _5.2.4.1_ new ...) seems to result in a working application.
It is possible some older Rails 6.x would also work.
FWIW, Rails 6.0.3.2 definitely does not work. I only get the first error though, not the second one. As far as this Issue is concerned, might it not be an easy fix to change the Quickstart guide to explicitly install and run Rails 5.2.4.1, then?
The quickstart guide was recently updated which newer versions of ruby and rails.