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

main.go:119: load templates: open templates: no such file or directory #234

Closed
ghost opened this issue Jan 6, 2020 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Jan 6, 2020

After following guide, I get:

$ writefreely -c config.ini 
2020/01/06 22:21:54 Starting WriteFreely ...
2020/01/06 22:21:54 Loading config.ini configuration...
2020/01/06 22:21:54 Loading templates...
ERROR: 2020/01/06 22:21:54 main.go:119: load templates: open templates: no such file or directory
@thebaer
Copy link
Member

thebaer commented Jan 6, 2020

Hi @somenxavier, are you running writefreely from the same directory where you have the templates directory? (And keys and static, etc.)

@ghost
Copy link
Author

ghost commented Jan 8, 2020

I just run what is written in Getting Started:

  1. writefreely --config
  2. writefreely --gen-keys
  3. writefreely

I choose sqlite3

@thebaer
Copy link
Member

thebaer commented Jan 8, 2020

Great, which directory are you in? It should contain a templates folder.

If it doesn't, you'll want to change into the folder where you put WriteFreely.

@thebaer
Copy link
Member

thebaer commented Jan 10, 2020

Closing this now since this is likely isn't a bug. But please feel free to continue commenting here.

@maphew
Copy link

maphew commented Jan 21, 2024

This can happen when running on a system which alerady has writefreely executable installed and you're not installing from scratch, e.g. a shared host.

Go to the releases page and download the closest match, and extract the directories into where you want to run WF from. Freebsd example:

Download the latest release for MacOS. It probably doesn't matter which system though as we're just after the templates and other resources.

cd ~/../protected
wget https://github.com/writefreely/writefreely/releases/download/v0.14.0/writefreely_0.14.0_macos_amd64.tar.gz
tar -xzvf writefreely_0.14.0_macos_amd64.tar.gz
cd writefreely

# delete the MacOS executable
rm ./writefreely

Carry on with config start and key generation.
You'll probably also need to make the keys folder readable by the Web user.

chgrp web keys keys/*
chmod g+r keys keys/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants