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

won't run in lapis application #1

Closed
zachrburke opened this issue Oct 27, 2013 · 1 comment
Closed

won't run in lapis application #1

zachrburke opened this issue Oct 27, 2013 · 1 comment

Comments

@zachrburke
Copy link

/usr/local/share/lua/5.1/lapis/application.lua:526: attempt to call a table value
stack traceback:
Traceback

stack traceback:
  [C]: in function 'error'
  /usr/local/share/lua/5.1/lapis/application.lua:526: in function 'handler'
  /usr/local/share/lua/5.1/lapis/application.lua:338: in function 'resolve'
  /usr/local/share/lua/5.1/lapis/application.lua:347: in function </usr/local/share/lua/5.1/lapis/application.lua:345>
  [C]: in function 'xpcall'
  /usr/local/share/lua/5.1/lapis/application.lua:345: in function 'dispatch'
  /usr/local/share/lua/5.1/lapis/nginx.lua:170: in function </usr/local/share/lua/5.1/lapis/nginx.lua:168>

Get this when running

etlua = require 'etlua'

lapis.serve class extends lapis.Application

  [index: '/:slug']: capture_errors =>
    -- ... some code

    template = etlua.compile '<span><%= slug%></span>'

    -- ... some more code

in a lapis application.

This works in a console application:

etlua = require 'etlua'
template = etlua.compile '<span><%= slug%></span>'
@leafo
Copy link
Owner

leafo commented Oct 28, 2013

Just pushed out a new version, give it a shot.

luarocks install --server=http://rocks.moonscript.org etlua

92f0f7d

@leafo leafo closed this as completed Oct 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants