openresty / openresty/openresty.org

attempt to call field 'say' (a nil value)

Open
#108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.3k
Forks
293
Avg merge
2d 20h
Merged PRs (30d)
2

Description

follower this find error :
https://openresty.org/cn/using-luarocks.html

ERROR:

tail -f /usr/local/openresty/nginx/logs/error.log


2019/11/04 18:31:48 [error] 2028#2028: *2 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:68):3: attempt to call field 'say' (a nil value)
stack traceback:
coroutine 0:
	content_by_lua(nginx.conf:68): in main chunk, client: 127.0.0.1, server: localhost, request: "GET /luarocks HTTP/1.1", host: "localhost"


nginx.conf

    64	        location = /luarocks {
    65	            content_by_lua '
    66	                local foo = require("foo")
    67	                foo.say("hello, luarocks!")
    68	            ';
    69	        }
    70	

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the content_by_lua block in nginx.conf at lines 64-69 and compare it with the linked LuaRocks/OpenResty example. Reproduce the GET /luarocks request while checking the reported error log and the foo module setup. The issue gives no acceptance condition, so completion requires confirming the intended behavior and the cause of the missing say field.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.