1

Topic: Local usage Lua of a script with lua-resty-jwt unit

It is given: Nginx + Lua (openresty), lua-resty-jwt unit, in config Nginx is used code Lua. All it successfully works in the docker. It would be desirable to test the code lua locally without setting Nginx:: Test and other libraries, except most lua-resty-jwt Tried to make so: put in linux (Linux Mint 18.1 Serena) Lua, luarocks, with luarocks installed lua-resty-jwt. Launched a script and received an import error resty.jwt: lua:/usr/local/share/lua/5.2/resty/jwt.lua:3: module ' resty.aes' not found: no field package.preload [' resty.aes'] no file '/usr/local/share/lua/5.2/resty/aes.lua ' no file ' /usr/local/share/lua/5.2/resty/aes/init.lua ' no file '/usr/local/lib/lua/5.2/resty/aes.lua ' no file ' /usr/local/lib/lua/5.2/resty/aes/init.lua ' no file '/usr/share/lua/5.2/resty/aes.lua ' no file '/usr/share/lua/5.2/resty/aes/init.lua ' no file './resty/aes.lua ' no file '/usr/local/lib/lua/5.2/resty/aes.so ' no file ' /usr/lib/x86_64-linux-gnu/lua/5.2/resty/aes.so ' no file '/usr/lib/lua/5.2/resty/aes.so ' no file '/usr/local/lib/lua/5.2/loadall.so ' no file './resty/aes.so ' no file '/usr/local/lib/lua/5.2/resty.so ' no file ' /usr/lib/x86_64-linux-gnu/lua/5.2/resty.so ' no file '/usr/lib/lua/5.2/resty.so ' no file '/usr/local/lib/lua/5.2/loadall.so ' no file './resty.so ' stack traceback: [C]: in function ' require '/usr/local/share/lua/5.2/resty/jwt.lua:3: in main chunk [C]: in function ' require './//verify_download.lua:3: in main chunk [C]: in function ' require ' test_verify_download.lua:40: in main chunk [C]: in? Then installed lua-resty-string which just should contain resty.aes: sudo luarocks install lua-resty-string I Repeat start - the same error. Probably, these units are ground on operation with nginx/openresty, and they need to be imported somehow in another way? Perhaps, there are any other variants how to use lua-resty-jwt unit locally?

2

Re: Local usage Lua of a script with lua-resty-jwt unit

Hello, Maxim_T, you wrote: M_T> I Repeat start - the same error. Can check up ways, all the same? I, when was picked with openresty, came across exactly the same simply  errors in a config

3

Re: Local usage Lua of a script with lua-resty-jwt unit

Hello, neFormal, you wrote: F> can check up ways, all the same? F> I when it was picked with openresty, came across exactly the same simply  errors in a config It seems that put in versions lua. luarocks puts all in 5.1, and my script searched for library in 5.2. On the primary goal - switched to usage busted for testing, now it is necessary to reduce all it to operation with one version lua.

4

Re: Local usage Lua of a script with lua-resty-jwt unit

Hello, Maxim_T, you wrote: M_T> Hello, neFormal, you wrote: F>> can check up ways, all the same? F>> I when it was picked with openresty, came across exactly the same simply  errors in config M_T> It seems that put in versions lua. luarocks puts all in 5.1, and my script searched for library in 5.2. M_T> On the primary goal - switched to usage busted for testing, now it is necessary to reduce all it to operation with one version lua. For operation busted it was necessary to collect still lua-resty-busted, and probably it is necessary to use fakengx.