Closed imaitland closed 2 years ago
@imaitland, thank you for the report. I don't see this issue running locally. Can you re-test on the current master branch (or at least 0.26+) and let me know if you still have the issue?
git clone git@github.com:pkulchenko/fullmoon.git \
&& cd fullmoon \
&& curl https://redbean.dev/redbean-latest.com >redbean.com \
&& chmod +x redbean.com \
&& mkdir .lua \
&& cp fullmoon.lua .lua \
&& cp examples/techbench.lua .lua \
&& echo 'require "techbench"' >.init.lua \
&& zip redbean.com .init.lua .lua/fullmoon.lua .lua/techbench.lua \
&& bash -c './redbean.com -v'
curl http://127.0.0.1:8080/json
Produces:
500 Internal Server Error
/zip/.lua/fullmoon.lua:817: global 'EncodeJson' is not callable (a nil value)
stack traceback:
/zip/.lua/fullmoon.lua:817: in field 'handler'
/zip/.lua/fullmoon.lua:253: in function 'fullmoon.render'
(...tail calls...)
/zip/.lua/fullmoon.lua:474: in function </zip/.lua/fullmoon.lua:435>
Note: I am using zsh hence the funny command to launch redbean.
Since you're using redbean 1.5, there are several methods that are missing that fullmoon relies on (EncodeJson is one of them). You need to compile redbean yourself or use binaries from the upcoming 2.0 release. I'm also working on a service that will allow you to run your application in a pkayground and get a fullmoon+redbean binary.
@imaitland, can you re-test with the current redbean version: https://justine.lol/redbean/redbean-latest.com? I expect the issue to be resolved.
Yes I will have some time this evening to give this a shot, will report back here.
NVM, just did it, and yes, confirmed this now works.
Hi, I am seeing this error when playing around with the techbench example. The below is for the
/json
route but same happens with/db
.zip redbean.com .init.lua .lua/fullmoon.lua .lua/techbench.lua && sh ./redbean.com -vvmbag