How to Install Ruby and Rails on Mac
在Mac上安裝ruby on rails開發環境
1. install rvm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #comment
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
#(if error message shown -> rvm reinstall 2.1.3 --disable-binary)
#modify .zshrc .bash_profile and relaunch terminal
$ echo progress-bar >> ~/.curlrc
$ echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
$ echo "gem: --no-document" >> ~/.gemrc
#test rvm ready or not
$ type rvm | head -n 1
$ rvm list known
$ rvm install x.x
$ rvm use 2.1 (rvm use 2.1 --default)
|
2. install bundler and rails
1
2
3
| $ gem update --system #更新gem library
$ gem install bundler #安裝bundler
$ gem install rails --no-ri --no-rdoc #安裝rails
|
3. getting start with Git
1
2
3
4
5
6
7
8
9
10
11
| $ git config --global color.ui true
$ git config --global user.name "YOUR NAME"
$ git config --global user.email "YOUR@EMAIL.com"
$ ssh-keygen -t rsa -C "YOUR@EMAIL.com"
$ cat ~/.ssh/id_rsa.pub
# then paste it (your pub key) to https://github.com/settings/ssh
# more how-to info => https://help.github.com/articles/generating-ssh-keys/
# check it work or not
$ ssh -T git@github.com
|