Skip to content

Unable to run buffalo app without using buffalo command (sqlite) #580

@TechplexEngineer

Description

@TechplexEngineer

Running the app with buffalo dev works but go run main.go generates errors about sqlite3 being an unsupported dialect.
I installed buffalo using this command GO111MODULE=on go get -u -v -tags sqlite github.com/gobuffalo/buffalo/buffalo

Steps to reproduce

  1. mkdir buffalo-test; cd buffalo-test
  2. buffalo new --db-type sqlite3 --skip-yarn test-project
  3. cd test-project
  4. buffalo dev #works as expected
  5. go run main.go

Output of go run main.go

[POP] 2021/01/25 10:26:01 warn - unable to load connection test: unsupported dialect 'sqlite3'
[POP] 2021/01/25 10:26:01 warn - unable to load connection production: unsupported dialect 'sqlite3'
[POP] 2021/01/25 10:26:01 warn - unable to load connection development: unsupported dialect 'sqlite3'
2021/01/25 10:26:01 could not find connection named development
exit status 1
Output of `buffalo info`
-> Go: Checking installation
✓ The `go` executable was found on your system at: /home/<user>/.local/local/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.15.6, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains /home/<user>/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /usr/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v14.15.4, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /usr/bin/npm

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.14.10, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /home/<user>/.npm-global/bin/yarnpkg

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.22.10, meets the minimum requirements.

-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:

https://www.postgresql.org/download/

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.31.1, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /home/<user>/.local/local/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.16.20, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         /home/<user>/projects/pers/rm/buffalo03/test-project
Root        /home/<user>/projects/pers/rm/buffalo03/test-project
GoPath      /home/<user>/go
PackagePkg  test-project
ActionsPkg  test-project/actions
ModelsPkg   test-project/models
GriftsPkg   test-project/grifts
WithModules true
Name        test-project
Bin         bin/test-project
VCS         git
WithPop     true
WithSQLite  true
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    false
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[build:webpack -p --progress dev:webpack --watch]}

-> Buffalo: config/buffalo-app.toml
name = "test-project"
bin = "bin/test-project"
vcs = "git"
with_pop = true
with_sqlite = true
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = false
with_docker = true
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-auth"
  go_get = "github.com/gobuffalo/buffalo-auth"
  tags = ["sqlite"]

[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop/v2"
  tags = ["sqlite"]

-> Buffalo: go.mod
module test-project

go 1.15

require (
	github.com/gobuffalo/buffalo v0.15.5
	github.com/gobuffalo/buffalo-auth v1.3.1 // indirect
	github.com/gobuffalo/buffalo-pop/v2 v2.3.0
	github.com/gobuffalo/envy v1.9.0
	github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517
	github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
	github.com/gobuffalo/mw-i18n v0.0.0-20190129204410-552713a3ebb4
	github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525
	github.com/gobuffalo/packr/v2 v2.8.0
	github.com/gobuffalo/pop v4.13.1+incompatible
	github.com/gobuffalo/pop/v5 v5.3.0
	github.com/gobuffalo/validate v2.0.4+incompatible
	github.com/gofrs/uuid v3.2.0+incompatible
	github.com/pkg/errors v0.9.1
	github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c
	golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions