vuerecipe icon indicating copy to clipboard operation
vuerecipe copied to clipboard

unable to fetch records: pq: relation "bands" does not exist

Open marcoippolito opened this issue 5 years ago • 0 comments

In Ubuntu 18.04.01 Server Edition

marco@pc01:~/go/src/github.com/gobuffalo/vuerecipe$ npm install

> [email protected] install /home/marco/go/src/github.com/gobuffalo/vuerecipe/node_modules
/node-sass
> node scripts/install.js

Cached binary found at /home/marco/.npm/node-sass/4.9.4/linux-x64-57_binding.node

> [email protected] postinstall /home/marco/go/src/github.com/gobuffalo/vuerecipe/node_modules
/core-js-pure
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard 
library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /home/marco/go/src/github.com/gobuffalo/vuerecipe/node_modules
/node-sass
> node scripts/build.js

Binary found at /home/marco/go/src/github.com/gobuffalo/vuerecipe/node_modules/node-
sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] 
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]:
 wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 753 packages from 445 contributors and audited 9076 packages in 9.839s
found 2 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

marco@pc01:~/go/src/github.com/gobuffalo/vuerecipe$ npm audit fix
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]  
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]:
 wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
updated 1 package in 2.652s
fixed 2 of 2 vulnerabilities in 9076 scanned packages

After adding .env file:

marco@pc01:~/go/src/github.com/gobuffalo/vuerecipe$ cat .env
# This .env file was generated by buffalo, add here the env variables you need 
# buffalo to load into the ENV on application startup so your application works correctly.
# To add variables use KEY=VALUE format, you can later retrieve this in your application
# by using os.Getenv("KEY").
#
# Example:
# DATABASE_PASSWORD=XXXXXXXXX
# SESSION_SECRET=XXXXXXXXX
# SMTP_SERVER=XXXXXXXXX
ADDR=192.168.1.7
PORT=8080

everything seems working:

marco@pc01:~/go/src/github.com/gobuffalo/vuerecipe$ buffalo db create -a
v4.11.1

[POP] 2019/06/18 09:35:08 info - create vuerecipe_test      
(postgres://postgres:[email protected]:5432/vuerecipe_test?sslmode=disable)
[POP] 2019/06/18 09:35:08 info - created database vuerecipe_test
[POP] 2019/06/18 09:35:08 info - create vuerecipe_production  
(postgres://postgres:[email protected]:5432/vuerecipe_production?sslmode=disable)
[POP] 2019/06/18 09:35:08 info - created database vuerecipe_production
[POP] 2019/06/18 09:35:08 info - create vuerecipe_development 
(postgres://postgres:[email protected]:5432/vuerecipe_development?sslmode=disable)
[POP] 2019/06/18 09:35:09 info - created database vuerecipe_development
marco@pc01:~/go/src/github.com/gobuffalo/vuerecipe$ buffalo dev
buffalo: 2019/06/18 09:35:15 === Rebuild on: :start: ===
buffalo: 2019/06/18 09:35:15 === Running: go build -v -i -tags development -o tmp/vueband-
build  (PID: 5216) ===
github.com/gobuffalo/uuid
github.com/gobuffalo/vuerecipe/models
github.com/gobuffalo/vuerecipe/actions
github.com/gobuffalo/vuerecipe

webpack is watching the files…

Live Reload listening on port 35729

buffalo: 2019/06/18 09:35:17 === Building Completed (PID: 5216) (Time: 1.399445678s) ===
buffalo: 2019/06/18 09:35:17 === Running: tmp/vueband-build (PID: 5343) ===
INFO[2019-06-18T09:35:17Z] Starting application at 192.168.1.7:8080
INFO[2019-06-18T09:35:17Z] Starting Simple Background Worker
Hash: 9bbef17734f9c21a9dc1
Version: webpack 4.5.0
Time: 1852ms
Built at: 2019-6-18 09:35:18
                               Asset       Size       Chunks             Chunk Names
674f50d287a8c48dc19ba404d20fe713.eot    162 KiB               [emitted]  
application.dcd7836825b84bd82e0e.css   1.15 MiB  application  [emitted]  application
 application.9bbef17734f9c21a9dc1.js    857 KiB  application  [emitted]  application
                     images/logo.svg   64.4 KiB               [emitted]  
                       manifest.json  224 bytes               [emitted]  
Entrypoint application = application.dcd7836825b84bd82e0e.css    
application.9bbef17734f9c21a9dc1.js
[./assets/css/application.scss] 39 bytes {application} [built]
[./assets/js/application.js] 560 bytes {application} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes 
{application} [built]
   [0] multi ./assets/js/application.js ./node_modules/jquery-ujs/src/rails.js ./assets
/css/application.scss 52 bytes {application} [built]
    + 26 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/index.js??ref--2-1!node_modules
/sass-loader/lib/loader.js??ref--2-2!assets/css/application.scss:
    Entrypoint mini-css-extract-plugin = *
    [./node_modules/css-loader/index.js??ref--2-1!./node_modules/sass-loader
/lib/loader.js??ref--2-2!./assets/css/application.scss] ./node_modules/css-loader??ref--  
2-1!./node_modules/sass-loader/lib/loader.js??ref--2-2!./assets/css/application.scss 379 KiB  
{mini-css-extract-plugin} [built]
        + 9 hidden modules

But when trying to accessing the url with the browser:

INFO[2019-06-18T09:36:09Z] / content_type=text/html db=0s duration=8.389305ms  
human_size="712 B" method=GET params="{}" path=/ render="946.623µs"  
request_id=VcpStVMygy-dKbJlWzimF size=712 status=200
DEBU[2019-06-18T09:36:10Z] SELECT bands.bio, bands.created_at, bands.id, 
bands.name, bands.updated_at FROM bands AS bands LIMIT 20 OFFSET 0
INFO[2019-06-18T09:36:10Z] /api/bands/ content_type=application/json db="531.149µs" 
duration=1.145986ms human_size="0 B" method=GET params="{}" path=/api/bands/ 
request_id=VcpStVMygy-CllAxMukZO size=0 status=0
ERRO[2019-06-18T09:36:10Z] unable to fetch records: pq: relation "bands" does not exist 
content_type=application/json db="531.149µs" duration=1.145986ms human_size="0 B"  
method=GET params="{}" path=/api/bands/ request_id=VcpStVMygy-CllAxMukZO size=0 
status=0
INFO[2019-06-18T09:36:22Z] / content_type=text/html db=0s duration=1.519463ms  
human_size="712 B" method=GET params="{}" path=/ render="743.381µs"  
request_id=VcpStVMygy-dzEEczxYba size=712 status=200
DEBU[2019-06-18T09:36:22Z] SELECT bands.bio, bands.created_at, bands.id, 
bands.name, bands.updated_at FROM bands AS bands LIMIT 20 OFFSET 0
INFO[2019-06-18T09:36:22Z] /api/bands/ content_type=application/json db="504.044µs" 
duration=1.431836ms human_size="0 B" method=GET params="{}" path=/api/bands/  
request_id=VcpStVMygy-rAovaohMYV size=0 status=0
ERRO[2019-06-18T09:36:22Z] unable to fetch records: pq: relation "bands" does not exist 
content_type=application/json db="504.044µs" duration=1.431836ms human_size="0 B" 
method=GET params="{}" path=/api/bands/ request_id=VcpStVMygy-rAovaohMYV size=0 
status=0

marcoippolito avatar Jun 18 '19 09:06 marcoippolito