GithubHelp home page GithubHelp logo

Comments (8)

craigp avatar craigp commented on July 28, 2024

Ok, I seem to have been able to fix my issue by changing:

lua_package_path "/opt/openresty/lualib/resty/?.lua";

.. which is the default, to:

lua_package_path "/opt/openresty/lualib/?.lua;;";

(Might be worth documenting that somewhere, unless I missed it, caused me a ton of frustration)

from lua-resty-core.

agentzh avatar agentzh commented on July 28, 2024

@craigp You don't need to use lua_package_path since those libraries are always visible in the default search paths used by OpenResty. "/opt/openresty/lualib/resty/?.lua" is the wrong search path. Always use the one in the documentation. Also the documentation already says that you don't need that if you are using the OpenResty bundle. The semantics of Lua search paths is already documented in the Lua 5.1 reference manual:

http://www.lua.org/manual/5.1/manual.html#pdf-package.loaders

from lua-resty-core.

craigp avatar craigp commented on July 28, 2024

Cool thanks. When I installed OpenResty it had lua_package_path "/opt/openresty/lualib/resty/?.lua"; in there already, will remove it in future.

from lua-resty-core.

agentzh avatar agentzh commented on July 28, 2024

@craigp Are you sure you are using the official OpenResty distribution? See

http://openresty.org/en/download.html

I'm pretty sure the official distribution's nginx.conf does not have that wrong directive.

from lua-resty-core.

agentzh avatar agentzh commented on July 28, 2024

@craigp Whatever 3rd-party OpenResy distribution you are currently using, I suggest you contact the maintainer of that distribution to fix the problem in their nginx.conf.

from lua-resty-core.

craigp avatar craigp commented on July 28, 2024

yup, downloaded the official. Anyway, no big deal. If I have time tomorrow I'll do an install from scratch to confirm that it does the same.

from lua-resty-core.

agentzh avatar agentzh commented on July 28, 2024

@craigp The official OpenResty distribution ships the official nginx distribution's nginx.conf. So there's no way that you see any ngx_lua specific configurations like lua_package_path. No way :)

from lua-resty-core.

craigp avatar craigp commented on July 28, 2024

Yeah, no worries man, I was scrambling to get things to work and taking bad advice from IRC, so I likely put that in there and didn't remember ;)

from lua-resty-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.