lua-users home
lua-l archive

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

Quoting Mukhsein Johari <>:

> Now I'm stumped. What do I do now?

since you changed some require("xxx.yyy") to require("yyy"), i think most of
your troubles come from the exact layout of the libraries directories.

do you have a LUA_PATH environment variable?

what platform are you using?

most of the 'many modules' libraries (like socket) like to be put on a subdir in
the LUA_PATH library dir.

for example: the url library is used with require("socket.url") because the url
library is inside a 'socket' subdir.  this also makes the 'url' namespace to be
registered inside the 'socket' namespace.

it's better to setup your libraries as the code requires it, and not to rewrite
it to adapt to your directories.

if you don't want to move around your libraries, you can also put symlinks to
where the app wants it.