[英]golang fork exec error - gobuffalo
I am new to go and trying to create some basic gobuffalo apps but I keep encountering fork/exec
errors such as 我是新手,尝试创建一些基本的gobuffalo应用程序,但是我不断遇到fork/exec
错误,例如
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. 我尝试重命名buffalo_experiments
文件夹以匹配我的os usr(这是clementoh
但没有任何好处。
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
. 我有同样的问题:)您可能使用了错误的buffalo二进制文件/usr/local/bin/buffalo
。 It should be the binary which is located in your $GOPATH. 它应该是位于$ GOPATH中的二进制文件。 For Example: $GOPATH/bin/buffalo
例如: $GOPATH/bin/buffalo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.