golang fork exec error - gobuffalo

时间:2018-03-30 06:17:36

标签: go

我是新手,尝试创建一些基本的gobuffalo应用,但我遇到fork/exec错误,例如

ERRO[0000] Error: fork/exec /usr/local/bin/buffalo: exec format error

我的buffalo应用程序目前位于以下目录中:

~/projects/golang/src/github.com/buffalo_experiments/coke

我尝试重命名buffalo_experiments文件夹以匹配我的操作系统clementoh,但它没有任何好处。

有人可以向我解释一下发生了什么吗?我想因为这个错误...我运行时没有生成迁移文件:

buffalo g resource users name email bio:nulls.Text

完整标准

      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

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题:) 您可能使用了错误的水牛二进制文件/usr/local/bin/buffalo。 它应该是位于$ GOPATH中的二进制文件。 例如:$GOPATH/bin/buffalo