New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffalo routes doesn't work #1511

Open
vikram-rawat opened this Issue Dec 18, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@vikram-rawat
Copy link

vikram-rawat commented Dec 18, 2018

when I run the command this is what I get. How do I get the routes mapped in my application.

PS C:\Projects\src\dbapp> buffalo routes
package main:
.grifter\main.go:4:10: invalid import path: "C:/Projects/src/dbapp/grifts"
Usage:
  buffalo routes [flags]

Flags:
  -h, --help   help for routes

←[31mERRO←[0m[0005] Error: exit status 1
@jh125486

This comment has been minimized.

Copy link

jh125486 commented Jan 3, 2019

I had the same problem using Bash on Windows.
Have you tried using cmd.exe and running buffalo routes?

@paganotoni paganotoni changed the title buffao routes doesn't work buffalo routes doesn't work Jan 8, 2019

@markbates

This comment has been minimized.

Copy link
Member

markbates commented Jan 8, 2019

Can you please run buffalo info and paste the results? This feels like an environmental issue, but we don't have the info needed to help.

@jh125486

This comment has been minimized.

Copy link

jh125486 commented Jan 8, 2019

So it's definitely something to do with Windows cmd.exe vs Bash path handling.

Here is Bash output:

$ buffalo info
### Buffalo Version
v0.13.12

### App Information
Pwd=C:\Users\XXX
Root=C:\Users\XXX
GoPath=C:/Users/XXX/go
Name=XXX
Bin=bin\XXX.exe
PackagePkg=../../XXX
ActionsPkg=../../XXX/actions
ModelsPkg=../../XXX/models
GriftsPkg=../../XXX/grifts
VCS=
WithPop=false
WithSQLite=false
WithDep=false
WithWebpack=false
WithYarn=false
WithDocker=false
WithGrifts=false
WithModules=false

### Go Version
go version go1.11.4 windows/amd64

### Go Env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\XXX\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:/Users/XXX/go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\XXX\AppData\Local\Temp\go-build408103730=/tmp/go-build -gno-record-gcc-switches

### Node Version
v10.13.0

### NPM Version
6.4.1

### Yarn Version
1.12.3

### PostgreSQL Version
PostgreSQL Not Found

### MySQL Version
MySQL Not Found

### SQLite Version
3.8.7.2 2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93

### Dep Version
could not find a Gopkg.toml file

### Dep Status
could not find a Gopkg.toml file

cmd.exe

### Buffalo Version
v0.13.12

### App Information
Pwd=C:\Users\XXX
Root=C:\Users\XXX
GoPath=C:\Users\XXX\go
Name=XXX
Bin=bin\XXX.exe
PackagePkg=../../XXX
ActionsPkg=../../XXX/actions
ModelsPkg=../../XXX/models
GriftsPkg=../../XXX/grifts
VCS=
WithPop=false
WithSQLite=false
WithDep=false
WithWebpack=false
WithYarn=false
WithDocker=false
WithGrifts=false
WithModules=false

### Go Version
go version go1.11.4 windows/amd64

### Go Env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\XXX\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\XXX\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\XXX\AppData\Local\Temp\go-build723465106=/tmp/go-build -gno-record-gcc-switches

### Node Version
v10.13.0

### NPM Version
6.4.1

### Yarn Version
1.12.3

### PostgreSQL Version
PostgreSQL Not Found

### MySQL Version
MySQL Not Found

### SQLite Version
3.8.7.2 2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93

### Dep Version
could not find a Gopkg.toml file

### Dep Status
could not find a Gopkg.toml file
@markbates

This comment has been minimized.

Copy link
Member

markbates commented Jan 15, 2019

You hid really import path information, so it's hard to truly help you.

However, if this is true:

Pwd=C:\Users\XXX
Root=C:\Users\XXX
GoPath=C:\Users\XXX\go

Then you're not inside your GOPATH. that's a requirement for GO. confirm you GOPATH matches exactly your file system, remember it is case-sensitive. Then make sure you are developing in GOPATH/src.

If that still doesn't not work, you'll need to provide complete buffalo info output for us to help any further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment