luarocks / luarocks-site

LuaRocks website and module host
http://luarocks.org
176 stars 36 forks source link

file doesn't exist `nginx.conf.compiled' #7

Closed dnelson closed 10 years ago

dnelson commented 10 years ago

I'm trying to install moonrocks-site on an ubuntu-12.04 server. I managed to get through all the steps up to "make schema", which errored out.

root@repo:/usr/local/moonrocks# lapis exec 'require"schema".make_schema()' --trace
Using temporary server...
Error: /usr/local/share/lua/5.1//lapis/cmd/path.lua:37: file doesn't exist `nginx.conf.compiled'
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1//lapis/cmd/path.lua:37: in function 'read_file'
    /usr/local/share/lua/5.1//lapis/cmd/nginx.lua:303: in function 'attach_server'
    /usr/local/share/lua/5.1//lapis/cmd/actions.lua:240: in function </usr/local/share/lua/5.1//lapis/cmd/actions.lua:225>
    (tail call): ?
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1//lapis/cmd/actions.lua:332: in function 'execute'
    /usr/local/lib/luarocks/rocks/lapis/dev-1/bin/lapis:4: in main chunk
    [C]: ?

I'm not sure what should be generating that file. It looks like maybe I could replace all the variables in nginx.conf manually, but I doubt that's what you intended people to do.

leafo commented 10 years ago

Try running lapis build first

dnelson commented 10 years ago

That gave me an nginx.conf.compiled but now I get:

root@repo:/usr/local/moonrocks# lapis exec 'require"schema".make_schema()' --trace
Using temporary server...
Error: /usr/local/share/lua/5.1//lapis/cmd/nginx.lua:222: Timed out waiting for server to start
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1//lapis/cmd/nginx.lua:222: in function 'wait_until_ready'
    /usr/local/share/lua/5.1//lapis/cmd/nginx.lua:327: in function 'attach_server'
    /usr/local/share/lua/5.1//lapis/cmd/actions.lua:240: in function </usr/local/share/lua/5.1//lapis/cmd/actions.lua:225>
    (tail call): ?
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1//lapis/cmd/actions.lua:332: in function 'execute'
    /usr/local/lib/luarocks/rocks/lapis/dev-1/bin/lapis:4: in main chunk
    [C]: ?

I suppose this issue can be closed though, since my original error is fixed. That command should probably be added to the build instructions.

leafo commented 10 years ago

ignoring making the schema for the moment, does running lapis server throw any errors?

dnelson commented 10 years ago

It did throw errors, basically I figured out that I had vanilla nginx installed first in my path and openresty afterward, which was preventing lapis from starting correctly. Thanks for the help.