ChatTheatre / SkotOS

Open Source version of the SkotOS narrative prose library, using the DGD driver.
https://www.ChatTheatre.com
Other
24 stars 6 forks source link

Error in mac_setup.sh, no skotos_dev_ngnix.conf #23

Closed ChristopherA closed 3 years ago

ChristopherA commented 3 years ago

Fresh clone https://github.com/ChatTheatre/SkotOS/commit/1391657ad38784e476a412752c7b9466e641dde4 of SkotOS in my local ChatTheatre dev directory, based on today's #22.

Did a cd SkotOS then ./dev_scripts/mac_setup.sh

Got this error:

./dev_scripts/mac_setup.sh: line 115: /usr/local/etc/nginx/servers/skotos_dev_nginx.conf: No such file or directory
noahgibbs commented 3 years ago

Oh, interesting. Do you know if you have an NGinX not installed via Homebrew by any chance?

noahgibbs commented 3 years ago

Relatedly: may I ask you to run this command? nginx -V 2>&1 | grep -o '\-\-conf-path=\(.*conf\)' | cut -d '=' -f2

On my Mac I'm getting /usr/local/etc/nginx/nginx.conf, but I suspect you'll get something different.

ChristopherA commented 3 years ago

I'm getting the same path:

% nginx -V 2>&1 | grep -o '\-\-conf-path=\(.*conf\)' | cut -d '=' -f2
/usr/local/etc/nginx/nginx.conf
ChristopherA commented 3 years ago

I was following the instructions from the README.md, which didn't mention I needed to separately brew install nginx. As there is no harm for the script to do so, I assumed it handled those kinds of dependencies.

ChristopherA commented 3 years ago

Though looking now, I see

% brew install nginx
Warning: nginx 1.19.3 is already installed and up-to-date
To reinstall 1.19.3, run `brew reinstall nginx`
noahgibbs commented 3 years ago

The script will "brew install nginx" if there's no nginx in the path. So you have it, but I guess it's not in your path? The file not found error is also odd - I think that's saying you don't have a directory /usr/local/etc/nginx/servers/.

I'm one micro version behind you (1.19.2), so I'm updating in case it's something they just changed.

noahgibbs commented 3 years ago

Huh. Look at that. They made a big incompatible change between 1.19.2 and 1.19.3. Not standard versioning!

==> Caveats
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

But they probably don't create that directory, they just check it if it exists. Argh. I'll fix that.

noahgibbs commented 3 years ago

Attempted fix for this with https://github.com/ChatTheatre/SkotOS/pull/25

noahgibbs commented 3 years ago

Chris, did this fix the problem you were seeing?

noahgibbs commented 3 years ago

I believe this problem should be gone for awhile now.