-
-
Notifications
You must be signed in to change notification settings - Fork 575
Error: you need to be inside your buffalo project path to run this command #629
Comments
You need to CD into the directory of your application. You are not in the right folder. After you generate your app you need to go into that directory to run your app. |
I did since I was able to run buffalo db command. |
Please confirm that you are in the correct directory by running If you still believe you're in the correct directory, please run |
[neutronstein@infineuty testbuffalo]$ ll -a
total 184
drwxr-xr-x. 7 neutronstein neutronstein 4096 8 sept. 23:57 .
drwxrwxr-x. 3 neutronstein neutronstein 4096 8 sept. 21:39 ..
drwxr-xr-x. 3 neutronstein neutronstein 4096 8 sept. 21:43 assets
-rw-rw-r--. 1 neutronstein neutronstein 358 8 sept. 23:04 database.yml
drwxrwxr-x. 8 neutronstein neutronstein 4096 8 sept. 22:18 .git
drwxr-xr-x. 2 neutronstein neutronstein 4096 8 sept. 22:02 grifts
drwxr-xr-x. 2 neutronstein neutronstein 4096 8 sept. 22:02 models
drwxrwxr-x. 516 neutronstein neutronstein 20480 8 sept. 21:49 node_modules
-rw-rw-r--. 1 neutronstein neutronstein 769 8 sept. 21:49 package.json
-rw-rw-r--. 1 neutronstein neutronstein 133655 8 sept. 21:49 yarn.lock
[neutronstein@infineuty testbuffalo]$ pwd
/home/neutronstein/Projects/Gogland/testbuffalo/src/gitlab.com/neutronstein/testbuffalo
[neutronstein@infineuty testbuffalo]$ echo $GOPATH
/home/neutronstein/Projects/Gogland/testbuffalo
[neutronstein@infineuty testbuffalo]$ |
You are missing half of the directories and files. That's why it doesn't think you're in a Buffalo app. Did you, or something delete them? How did you create your app? |
I ran |
Try generating another app without using the word buffalo in your app name. See if you have better results. I don't know why you only have half an app. Was there an error during generation perhaps? Did it exit successfully? |
there were no errors. I got contrats at the end. |
I get the same result.
|
There's something seriously wrong here. You only have half an app. I don't know how that's even possible. Can you run |
|
Can you paste the full output from
|
When I ran |
Are you running multiple |
I don't have multiple GOPATH. I mean for each project I am overring the GOPATH so I have only one at any time. |
I can confirm that if you use multiple Here's what happened. You installed the buffalo source (and generator templates) in
Because Go doesn't all you to, automatically, attach static files to a binary, Buffalo has to look for most of the template files on disk (some are generated in Go, which is why they aren't generated). When it goes to look up where the templates are it goes to Normally, this works just fine, however, since those template are all under The The solution here is to stick with one |
That's right. |
I seem to be experiencing the same issue, however, I did not change my gopath or have multiple gopaths. Or I am missing something. Go Env
Buffalo new meow
ls -la in meow
|
If you’re seeing that, and you only have one multiple GOPATHs then that would be a sign of a bad installation, because the templates are missing.
Try installing again
go get -u -v github.com/gobuffalo/buffalo/buffalo
Hopefully that should pull down all the files from GitHub.
…-----------
Mark Bates
On Nov 11, 2017, 10:19 PM -0600, Alex Costa ***@***.***>, wrote:
I seem to be experiencing the same issue, however, I did not change my gopath or have multiple gopaths. Or I am missing something.
Go Env
> GOARCH="amd64"
> GOBIN=""
> GOEXE=""
> GOHOSTARCH="amd64"
> GOHOSTOS="linux"
> GOOS="linux"
> GOPATH="/home/alex/go"
> GORACE=""
> GOROOT="/usr/local/go"
> GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
> GCCGO="gccgo"
> CC="gcc"
> GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build413436099=/tmp/go-build -gno-record-gcc-switches"
> CXX="g++"
> CGO_ENABLED="1"
> CGO_CFLAGS="-g -O2"
> CGO_CPPFLAGS=""
> CGO_CXXFLAGS="-g -O2"
> CGO_FFLAGS="-g -O2"
> CGO_LDFLAGS="-g -O2"
> PKG_CONFIG="pkg-config"
> Go Env
> GOARCH="amd64"
> GOBIN=""
> GOEXE=""
> GOHOSTARCH="amd64"
> GOHOSTOS="linux"
> GOOS="linux"
> GOPATH="/home/alex/go"
> GORACE=""
> GOROOT="/usr/local/go"
> GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
> GCCGO="gccgo"
> CC="gcc"
> GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build413436099=/tmp/go-build -gno-record-gcc-switches"
> CXX="g++"
> CGO_ENABLED="1"
> CGO_CFLAGS="-g -O2"
> CGO_CPPFLAGS=""
> CGO_CXXFLAGS="-g -O2"
> CGO_FFLAGS="-g -O2"
> CGO_LDFLAGS="-g -O2"
> PKG_CONFIG="pkg-config"
Buffalo new meow
> --> /home/alex/go/src/github.com/alexMcosta/meow/assets/images/logo.svg
> --> yarn install --no-progress --save
> yarn install v1.3.2
> info No lockfile found.
> [1/4] Resolving packages...
> [2/4] Fetching packages...
> [3/4] Linking dependencies...
> [4/4] Building fresh packages...
> info Lockfile not saved, no dependencies.
> Done in 0.06s.
> --> /home/alex/go/src/github.com/alexMcosta/meow/models/models.go
> --> /home/alex/go/src/github.com/alexMcosta/meow/models/models_test.go
> --> /home/alex/go/src/github.com/alexMcosta/meow/grifts/db.go
> --> go get github.com/markbates/pop/...
> --> database.yml
> --> goimports -w meow/grifts/db.go meow/models/models.go meow/models/models_test.go
> --> go get -u golang.org/x/tools/cmd/goimports
> --> go get -u github.com/motemen/gore
> --> go get -t ./...
> --> goimports -w grifts/db.go models/models.go models/models_test.go
> --> git init
> Initialized empty Git repository in /home/alex/go/src/github.com/alexMcosta/meow/.git/
> --> git add .
> --> git commit -m Initial Commit
> [master (root-commit) 84ef3a9] Initial Commit
> 5 files changed, 787 insertions(+)
> create mode 100644 assets/images/logo.svg
> create mode 100644 database.yml
> create mode 100644 grifts/db.go
> create mode 100644 models/models.go
> create mode 100644 models/models_test.go
> Congratulations! Your application, meow, has been successfully built!
> You can find your new application at:
> /home/alex/go/src/github.com/alexMcosta/meow
> Please read the README.md file in your new application for next steps on running your application.
ls -la in meow
> total 36
> drwxr-xr-x 6 alex alex 4096 Nov 11 20:12 .
> drwxrwxr-x 4 alex alex 4096 Nov 11 20:12 ..
> drwxr-xr-x 3 alex alex 4096 Nov 11 20:12 assets
> -rw-rw-r-- 1 alex alex 366 Nov 11 20:12 database.yml
> drwxrwxr-x 8 alex alex 4096 Nov 11 20:14 .git
> drwxr-xr-x 2 alex alex 4096 Nov 11 20:12 grifts
> drwxr-xr-x 2 alex alex 4096 Nov 11 20:12 models
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
use packr to manage templates for generators. hopefully this fixes issues like #629
I am not sure if this is helpful to anyone, but I had the same problem and found out that it was because the project I was working on happened to start with the letters "go"... so I was in " so the short of it is: if your project you are in happens to start with the same prefix as your GOPATH variable, then you will get this error |
@neutronstein Had the same issue. Solution was, i installed buffalo before i installed go. I uninstalled buffalo and installed it again. Everything is working fine now! :) |
I am getting error below while running
buffalo dev
andbuffalo generate
on a fresh buffalo new project.Buffalo Version
v0.9.4
Go Version
go version go1.9 linux/amd64
The text was updated successfully, but these errors were encountered: