|
Orbit only supports Lua 5.1. Hope this helps.
--
Regards,
Ryan
Sent from my phone
Hello all,
I tried to run an example of Orbit application. I have a very short
knowledge about web servers, so I try to follow the tips I have found.
First of all, I have installed everything:
$ sudo apt-get install lua5.2
$ cd /home/luciano/Downloads/luarocks
$ sudo chmod +x configure
$ sudo ./configure
$ sudo make build
$ sudo make install
$ sudo make bootstrapp
$ sudo luarocks install orbit
$ sudo luarocks install xavante
$ sudo luarocks install wsapi-xavante
So I regard this example:
-- x.lua
#!/usr/bin/env wsapi.cgi
local orbit = require('orbit')
module('hello', package.seeall, orbit.new)
function index(web)
return Render_Index()
end
hello:dispatch_get(index, '/index')
function Render_Index()
return [[
<html>
<title>Um teste</title>
<body>
<P> Eis aqui um teste. </p>
</body>
</html>]]
end
orbit.htmlify(hello, "render_.+")
return M
I run:
$ lua x.lua
and I got this error:
lua: /usr/local/share/lua/5.2/orbit.lua:9: attempt to call local
'setfenv' (a nil value)
stack traceback:
/usr/local/share/lua/5.2/orbit.lua:9: in main chunk
[C]: in function 'require'
x.lua:3: in main chunk
[C]: in ?
What's wrong?
In fact, my few knowledges can't detect the error.
I thanky you very much for any help.
Best regards,
--
Luciano de Souza