lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Orbit only supports Lua 5.1. Hope this helps.

Sent from my phone

On Sep 26, 2015 9:38 AM, "luciano de souza" <> wrote:
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,

function index(web)
return Render_Index()

hello:dispatch_get(index, '/index')

function Render_Index()
return [[
<title>Um teste</title>
<P> Eis aqui um teste. </p>

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