blacklight icon indicating copy to clipboard operation
blacklight copied to clipboard

Quickstart guide not currently working

Open jrochkind opened this issue 5 years ago • 2 comments

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>

jrochkind avatar Mar 02 '20 20:03 jrochkind

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.

jrochkind avatar Mar 02 '20 20:03 jrochkind

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?

sixtyfive avatar Jul 09 '20 23:07 sixtyfive

The quickstart guide was recently updated which newer versions of ruby and rails.

cjcolvar avatar Oct 05 '22 20:10 cjcolvar