Cannot build ratel

Moved from GitHub ratel/91

Posted by martinmr:

Trying to run the build script but I am getting this error when the script gets to building the server:

github.com/dgraph-io/ratel (download)
github.com/dgraph-io/ratel/server
# github.com/dgraph-io/ratel/server
server/server.go:69:13: undefined: Asset
server/server.go:77:13: undefined: Asset
server/server.go:82:15: undefined: AssetInfo
server/server.go:124:14: undefined: Asset
server/server.go:130:16: undefined: AssetInfo

martinmr commented :

I get the same error when I go to that folder and run go get.

paulftw commented :

Yes, it’s setup in a counterintuitive way, I too struggled first time I tried to build the go part.

Do you have ratel/server/bindata.go in you working directory?
If not something went wrong while running the build script. were there any error messages?

martinmr commented :

I see the bindata.go file but it’s still failing to build.

martinmr commented :

Found the reason for this. I originally cloned ratel to fix some issue on the javascript code. So I was trying to build it from outside the gopath and ratel was not installed in the gopath.

smeadows-abb commented :

I’m having the same issue. How did you fix this?

paulftw commented :

@smeadows-abb undefined: Asset used to be a symptom of missing go-bindata. Other thing Martin has mentioned is having to build Ratel from inside $GOPATH.

In my case working folder for ratel is ~/go/src/github.com/dgraph-io/ratel.

Feel free to ping me on Dgraph Community Slack if you need help troubleshooting this, my slack handle there is same as my Github handle.
Users sometimes mention this build issue, but I couldn’t reproduce it yet and still looking for an automatic way to detect and/or fix it.