Closed nscharfe closed 5 years ago
I have exactly the same problem.
Same problem. There's a thread in the #buffalo slack channel in regard to the issue — https://gophers.slack.com/archives/C3MSAFD40/p1543081112849200
this also wrecks generating a resource. my workaround has been to generate components individually(action, model, migration etc.).
same to me, it keeps complaining about
Pop support has been moved to the https://github.com/gobuffalo/buffalo-pop plugin.
Confirmed on Windows 10 with latest buffalo + sqlite as at 26 Nov.
Point GOPATH variable to %USERPROFILE%\workspaces\go
Point GOBIN to %USERPROFILE%\workspaces\go\bin
>go get -u -v -tags sqlite github.com/gobuffalo/buffalo/buffalo
>cd %USERPROFILE%\workspaces\go\src
> buffalo -h Helps you build your Buffalo applications that much easier!
Usage: buffalo [command]
Available Commands: build Builds a Buffalo binary, including bundling of assets (packr & webpack) destroy destroys generated code dev Runs your Buffalo app in 'development' mode fix will attempt to fix a Buffalo application's API to match version v0.13.6 generate A collection of generators to make life easier help Help about any command info Prints off diagnostic information useful for debugging. new Creates a new Buffalo application routes Print out all defined routes setup Setups a newly created, or recently checked out application. task Runs your grift tasks test Runs the tests for your Buffalo app. Use --force-migrations if you want to skip schema load. version Print the version number of buffalo
Flags: -h, --help help for buffalo
Use "buffalo [command] --help" for more information about a command.
> buffalo new coke --api create .buffalo.dev.yml create Dockerfile create .dockerignore create inflections.json create actions/home.go create main.go create fixtures/sample.toml create actions/actions_test.go create actions/render.go create .codeclimate.yml create .env create grifts/init.go create README.md create actions/home_test.go create go.mod create actions/app.go create models\models.go create models\models_test.go create grifts\db.go run go get github.com/gobuffalo/buffalo-pop [DEPRECATED] generate.Config has been deprecated. Use github.com/gobuffalo/pop/genny/config instead. run gofmt -w C:\Users\XXX\workspaces\go\src\coke\actions\actions_test.go C:\Users\XXX\workspaces\go\src\coke\actions\app.go C:\Users\XXX\workspaces\go\src\coke\actions\home.go C:\Users\XXX\workspaces\go\src\coke\actions\home_test.go C:\Users\XXX\workspaces\go\src\coke\actions\render.go C:\Users\XXX\workspaces\go\src\coke\grifts\db.go C:\Users\XXX\workspaces\go\src\coke\grifts\init.go C:\Users\XXX\workspaces\go\src\coke\main.go C:\Users\XXX\workspaces\go\src\coke\models\models.go C:\Users\XXX\workspaces\go\src\coke\models\models_test.go run go get golang.org/x/tools/cmd/goimports run go get -t ./... run goimports -w C:\Users\XXX\workspaces\go\src\coke\actions\actions_test.go C:\Users\XXX\workspaces\go\src\coke\actions\app.go C:\Users\XXX\workspaces\go\src\coke\actions\home.go C:\Users\XXX\workspaces\go\src\coke\actions\home_test.go C:\Users\XXX\workspaces\go\src\coke\actions\render.go C:\Users\XXX\workspaces\go\src\coke\grifts\db.go C:\Users\XXX\workspaces\go\src\coke\grifts\init.go C:\Users\XXX\workspaces\go\src\coke\main.go C:\Users\XXX\workspaces\go\src\coke\models\models.go C:\Users\XXX\workspaces\go\src\coke\models\models_test.go create .gitignore run git init Initialized empty Git repository in C:/Users/XXX/workspaces/go/src/coke/.git/ run git add . warning: LF will be replaced by CRLF in .buffalo.dev.yml. The file will have its original line endings in your working directory. ... warning: LF will be replaced by CRLF in models/models_test.go. The file will have its original line endings in your working directory. run git commit -q -m Initial Commit INFO[0331] Congratulations! Your application, coke, has been successfully built!
INFO[0331] You can find your new application at: C:\Users\XXX\workspaces\go\src\coke INFO[0331] Please read the README.md file in your new application for next steps on running your application.
>buffalo pop -h A tasty treat for all your database needs
Usage: buffalo-pop pop [flags] buffalo-pop pop [command]
Aliases: pop, db
Available Commands: create Creates databases for you destroy Allows to destroy generated code. drop Drops databases for you fix Brings pop, soda, and fizz files in line with the latest APIs generate Generates config, model, and migrations files. migrate Runs migrations against your database. reset Drop, then recreate databases schema Tools for working with your database schema version current version of pop
Flags: -c, --config string The configuration file you would like to use. -d, --debug Use debug/verbose mode -e, --env string The environment you want to run migrations against. Will use $GO_ENV if set. (default "development") -h, --help help for pop -p, --path string Path to the migrations folder (default "./migrations") -v, --version Show version information
Use "buffalo-pop pop [command] --help" for more information about a command.
> cd coke
> buffalo pop -h ERRO[0010] Pop support has been moved to the https://github.com/gobuffalo/buffalo-pop plugin.
Go Get Installation:
$ go get github.com/gobuffalo/buffalo-pop
Buffalo Plugins Installation*:
$ buffalo plugins install github.com/gobuffalo/buffalo-pop
Should be fixed with v0.13.7.
Still having issues after upgrading to v0.13.7 on Windows 10:
buffalo pop
is still not recognised within the application directory (%GOPATH%/src/coke).buffalo-pop pop
is recognisedbuffalo setup
fails with this message:
time="2018-11-27T10:21:16+10:30" level=info msg="--> buffalo pop create -a\n"
time="2018-11-27T10:21:33+10:30" level=error msg="Pop support has been moved to the https://github.com/gobuffalo/buffalo-pop plugin.\n\nGo Get Installation:\n\n\t$ go get github.com/gobuffalo/buffalo-pop\n\nBuffalo Plugins Installation*:\n\n\t$ buffalo plugins install github.com/gobuffalo/buffalo-pop\n\n* Requires https://github.com/gobuffalo/buffalo-plugins installed.\n"
I tried running buffalo-pop pop create -a
but got this error:
>buffalo-pop pop create -a
v4.9.2
[POP] 2018/11/27 10:47:11 warn - unable to load connection development: unsupported dialect 'sqlite3'
[POP] 2018/11/27 10:47:11 warn - unable to load connection test: unsupported dialect 'sqlite3'
[POP] 2018/11/27 10:47:11 warn - unable to load connection production: unsupported dialect 'sqlite3'
I tried running
buffalo-pop pop create -a
but got this error:>buffalo-pop pop create -a v4.9.2
As workaround i suggest use soda directly, like this:
soda create -a
and just use soda directly
for example
buffalo g resource tests name:text descr:text author:text
soda g model tests name:text descr:text author:text
soda migrate status
soda migrate up
soda migrate status
but you may be need to rebuild soda with
go get -u -v -tags sqlite github.com/gobuffalo/pop/soda
go install -tags sqlite github.com/gobuffalo/pop/soda
or may be rebuild buffalo itself with sqlite support
go get -u -v -tags sqlite github.com/gobuffalo/buffalo/buffalo
Thanks for the suggestion, @vasiliyaltunin!
> go get -u -v -tags sqlite github.com/gobuffalo/pop/soda
> go install -tags sqlite github.com/gobuffalo/pop/soda
> soda create -a
worked for me.
The new default timeout is set to 2s. If it's not enough and your system is slower than that, you can set the BUFFALO_PLUGIN_TIMEOUT
env var to a more appropriate value.
The new default timeout is set to 2s. If it's not enough and your system is slower than that, you can set the
BUFFALO_PLUGIN_TIMEOUT
env var to a more appropriate value.
Nope, i try to set BUFFALO_PLUGIN_TIMEOUT=20s
, and still get this error
buffalo g resource test_lists id:int name:string descr:text author:string
create actions/test_lists.go
create templates\test_lists\index.html
create templates\test_lists\new.html
create actions/test_lists_test.go
create locales/test_lists.en-us.yaml
create templates\test_lists\_form.html
create templates\test_lists\edit.html
create templates\test_lists\show.html
run buffalo db g model test_list id:int name:string descr:text author:string
←[31mERRO←[0m[0011] Pop support has been moved to the https://github.com/gobuffalo/buffalo-pop plugin.
Go Get Installation:
$ go get github.com/gobuffalo/buffalo-pop
Buffalo Plugins Installation*:
$ buffalo plugins install github.com/gobuffalo/buffalo-pop
* Requires https://github.com/gobuffalo/buffalo-plugins installed.
run goimports -w actions\actions_test.go actions\app.go actions\home.go actions\home_test.go actions\render.go actions\test_lists.go actions\test_lists_test.go grifts\db.go grifts\init.go main.go models\models.go models\models_test.go models\test_lists.go models\test_lists_test.go
Usage:
buffalo generate resource [name] [flags]
Aliases:
resource, r
Examples:
$ buffalo g resource users
Generates:
- actions/users.go
- actions/users_test.go
- models/user.go
- models/user_test.go
- migrations/2016020216301234_create_users.up.fizz
- migrations/2016020216301234_create_users.down.fizz
$ buffalo g resource users --skip-migration
Generates:
- actions/users.go
- actions/users_test.go
- models/user.go
- models/user_test.go
$ buffalo g resource users --skip-model
Generates:
- actions/users.go
- actions/users_test.go
$ buffalo g resource users --use-model users
Generates:
- actions/users.go
- actions/users_test.go
Flags:
-h, --help help for resource
-n, --name string allows to define a different model name for the resource being generated.
-s, --skip-migration tells resource generator not-to add model migration
--skip-model tells resource generator not to generate model nor migrations
--skip-templates tells resource generator not to generate templates for the resource
--use-model string tells resource generator to reference an existing model in generated code
←[31mERRO←[0m[0025] Error: exit status 4294967295
Setting the BUFFALO_PLUGIN_TIMEOUT env variable to 30s worked for me.
Steps:
BUFFALO_PLUGIN_TIMEOUT=30s
cd
to the application directorygo get -u -v -tags sqlite github.com/gobuffalo/buffalo/buffalo
buffalo pop -h
Command help is displayed as expected now!
Also, buffalo setup
completes without errors.It is concerning though that a timeout can have such a devastating effect (making buffalo commands unusable) without providing any warning message.
I'm +1 on this, running on v0.13.10
Description
I cannot run
buffalo pop
from within abuffalo
generated project. If icd
outside of thebuffalo
generated project, it works as expected.Note: Initially
buffalo plugins
was not working from within a generated project but upping the timeout got it working for me. Ex:export BUFFALO_PLUGIN_TIMEOUT=2s
Steps to Reproduce the Problem
go get
or viahomebrew
(same results for both)buffalo new
. Output herepop
plugin. Output hereExpected Behavior
Expecting
buffalo pop
to work from within abuffalo
generated project. Additionally,buffalo help
does not listpop
as a potential parameter.Actual Behavior
buffalo pop
not found within a buffalo generated project.Note that if i cd outside of the generated project directly,
buffalo pop
works andbuffalo help
listspop
as a potential parameter.This causes
buffalo generate
commands that rely onpop
/db
to not work. For example, see hereInfo