I am new to go and trying to create some basic gobuffalo apps but I keep encountering fork/exec
errors such as
ERRO[0000] Error: fork/exec /usr/local/bin/buffalo: exec format error
My buffalo app is currently in the directory:
~/projects/golang/src/github.com/buffalo_experiments/coke
I tried renaming the buffalo_experiments
folder to match my os usr which is clementoh
but it didn't do any good.
Could someone please explain to me what's going on? I think because of this error... the migration files are not being generated when I run:
buffalo g resource users name email bio:nulls.Text
Full stdout
create actions/users.go
create actions/users_test.go
create locales/users.en-us.yaml
create templates/users/_form.html
create templates/users/edit.html
create templates/users/index.html
create templates/users/new.html
create templates/users/show.html
run buffalo db g model user name email bio:nulls.Text
run goimports -w actions/actions_test.go actions/app.go actions/home.go actions/home_test.go actions/render.go actions/users.go actions/users_test.go grifts/db.go grifts/init.go main.go models/models.go models/models_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
ERRO[0000] Error: fork/exec /usr/local/bin/buffalo: exec format error
I had the same issue:) you are may using the wrong buffalo binary /usr/local/bin/buffalo
. It should be the binary which is located in your $GOPATH. For Example: $GOPATH/bin/buffalo