Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgmoon doesn't work in init_by_lua(_block) #27

Closed
vadimnehta opened this issue Mar 28, 2016 · 2 comments
Closed

pgmoon doesn't work in init_by_lua(_block) #27

vadimnehta opened this issue Mar 28, 2016 · 2 comments

Comments

@vadimnehta
Copy link

pgmoon is able to connect fine, but sending a query results in:

init_by_lua error: /usr/local/share/lua/5.1/pgmoon/init.lua:240: attempt to call method 'send_message' (a nil value)
@leafo
Copy link
Owner

leafo commented Mar 28, 2016

what version are you using? Do you have luasocket installed?

cosockets aren't available in init_by_lua, but it should fallback to using luasocket in that scenario

@vadimnehta
Copy link
Author

I did have luasocket installed - I was using pg.query instead of pg:query, forgot to change when converting from lapis.db. This is why include your code sample in an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants