Install golang by brew. I think that’s the easiest way to install go on OS X.
12345678910111213141516171819
$ brew install go
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/go-1.4.yosemite.bottle.ta
######################################################################## 100.0%
==> Pouring go-1.4.yosemite.bottle.tar.gz
==> Caveats
As of go 1.2, a valid GOPATH is required to use the `go get` command:
http://golang.org/doc/code.html#GOPATH
`go vet` and `go doc` are now part of the go.tools sub repo:
http://golang.org/doc/go1.2#go_tools_godoc
To get `go vet` and `go doc` run:
go get golang.org/x/tools/cmd/vet
go get golang.org/x/tools/cmd/godoc
You may wish to add the GOROOT-based install location to your PATH:
export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
? /usr/local/Cellar/go/1.4: 4557 files, 134M
Set Path for Go
Go needs paths for his root directory. I wrote like that.
12345
# .zshrc
# go
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
It is actually religious problems how people set $GOPATH and $GOROOT. Let you set them up to your belief.
I made two versions, one is using database by PostgreSQL, and another is not using one. If you do not have to use database on Heroku, please checkout light branch.
If you want to use database, please use master branch and do not forget runnning command below to add PostgreSQL addon for heroku.
1
$ heroku addons:create heroku-postgresql
And please edit migrate file to change the scheme of the table, or just remake the migration file. After finishing to edit the migration file, please run command below:
1
$ heroku run rake db:migrate
Please let you see README file for detailed usage.
If you find any bug or ideas, shoot me a message to my twitter account (@totzyuta) or create an issue on the repository page.
I love CUI, commands, the world of characters. And I got a new pc of OS X because of an internship of Cyber Agent I joined this summer. So I set up comfortable environment for nice CUI life by iTerm and zsh.
iTerm2-Color-Shemes is very cool and easy tool. The README.md is really easy to understand and follow the introduction. I could install that easily.
I chose Espresso. That theme is not bright so I prefer.
zsh
zsh is a kind of shell. The default shell of OS X is bash. bash is also great (the author looks so strong anyway..lol) but zsh is nice for geeks who want to customize a shell easily and well.
First installed Homebrew to install other programs.