datacite / schema

DataCite Metadata Schema Repository
https://schema.datacite.org
46 stars 16 forks source link

Use shared assets from assets.datacite.org #127

Closed svogt0511 closed 1 year ago

svogt0511 commented 1 year ago

Purpose

closes: schema#126 See the bug report.

Approach

Open Questions and Pre-Merge TODOs

Learning

Types of changes

Reviewer, please remember our guidelines:

KellyStathis commented 1 year ago

@svogt0511, I'm not sure why but I can't get this to work. The server starts, but when I access localhost in the browser this is the error message:

RuntimeError at /
Could not file /data/links.json
Ruby    /opt/homebrew/lib/ruby/gems/2.6.0/gems/borrower-0.10.0/lib/borrower/manifest.rb: in find, line 41
Web GET localhost/

Screen Shot 2023-05-15 at 14 43 01

Is there something else I need to do to access /data/links.json? I know this is hosted on the new assets server: https://assets.datacite.org/data/links.json - do I also need this locally somewhere?

svogt0511 commented 1 year ago

@KellyStathis - From the screenshot, it looks like it is looking in the wrong gemset. It should be looking in the project vendor/bundle. Did you (from the project directory):

cp .env.stage .env
bundle _1.17.3_ install
# make sure pandoc has been installed
bundle exec middleman server -e stage

links.json is used to generate header and footer links. For staging, it should live at https://assets.stage.datacite.org/data/links.json or production it lives at https://assets.datacite.org/data/links.json. You should not have to have it locally. Maybe when you tried it, that file wasn't in place at assets.datacite.org. Give it a try again.

I have done the builds locally (production/stage using 'middleman server' and production using 'middleman build' ) and have had no problem.

image

Pandoc may be problematic, but if I make sure it is installed, it works fine.