Russell
Russell

Reputation: 2812

luasql nil value

I tried to follow the example at http://www.keplerproject.org/luasql/examples.html

Lua 5.2.0  Copyright (C) 1994-2011 Lua.org, PUC-Rio
> require "luasql.postgres"
> env = assert (luasql.postgres())
stdin:1: attempt to index global 'luasql' (a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: in ?
> 

What am I missing?

Upvotes: 3

Views: 3218

Answers (1)

losinggeneration
losinggeneration

Reputation: 121

You could try

luasql = require "luasql.postgres"
env = assert (luasql.postgres())

Upvotes: 9

Related Questions