Closed chilijung closed 10 years ago
did you do lsc app.ls --boot
before loading the schema?
After I enter lsc app.ls --boot
I got
events.js:72
throw er; // Unhandled 'error' event
^
Error: FATAL: database "--boot" does not exist
at Connection.<anonymous> (/Users/lijung/Documents/g0v/api.ly/node_modules/pgrest/node_modules/plv8x/node_modules/pg/lib/native/index.js:202:17)
at Connection.EventEmitter.emit (events.js:95:17)
but I can serve by entering lsc app.ls ly
,
info: Available collections:
amendments bills calendar ivod laws motions sittings ttsbills ttsinterpellation ttsmotions
info: Serving `ly` on http://127.0.0.1:3000/collections
but there is no data in the tables
it should be lsc app.ls ly --boot
which initialize the tables, it's like lsc app.ls ly
except it doesn't run the server.
try to load data again after that.
Thanks for helping, but I still have no luck...
$ lsc app.ls ly --boot
$ curl https://dl.dropboxusercontent.com/u/30657009/ly/api.ly.bz2 | bzcat | psql ly -f -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 8692k 0 65134 0 0 21007 0 0:07:03 0:00:03 0:07:00 21004SET
SET
SET
SET
SET
SET
psql:<stdin>:17: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:18: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:19: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:20: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:21: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:22: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:23: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:<stdin>:24: ERROR: column "sitting_introduced" of relation "bills" does not exist
LINE 1: ...d_by, sponsors, cosponsors, introduced, abstract, sitting_in...
^
psql:
...
...
...
The dump needs upating. Will fix later today
@chilijung can you try again? the dump has been updated
@clkao ++ success!!!!
I've follow the instructions in https://github.com/g0v/api.ly#init
after enter
curl https://dl.dropboxusercontent.com/u/30657009/ly/api.ly.bz2 | bzcat | psql ly -f -
, I've got error message below. Seems like I haven't create the tables. Do anything missed in README? Or I've missed something?Thanks.