Crystal docs - crystal src errors

when I try to run crystal docs from crystal src directory it errors

Can you give the command you ran and the exact error it returned?

You’re supposed to run it from the root of the project not within src/.

EDIT: Assuming this your own project and not the actual crystal compiler repo.

Just call make docs.

You must use bin/crystal and the src/docs_main.cr entrypoint to avoid requiring everything from the src folder.

I ran it from the crystal-lang/crystal root . Trying to get a local copy of docs

Ah, yea in that case you’d want to do make docs. But really if all you want is an offline copy of the docs you can just download it from the latest GH release. Which as of now would be https://github.com/crystal-lang/crystal/releases/download/1.17.1/crystal-1.17.1-docs.tar.gz.

1 Like