Mac10.8的Rails環境搭建

第一次使用Mac Book,記錄於此。

1, 需要按照xcode

xcode 4.2以上的需要安裝 command line xxx

打開 xcode -> open develop tools -> more xxxx

2, 將 /Applications/Xcode.app/Contents/Developer/usr/bin  放到 $PATH

修改 ~/.bash_profile 文件

export PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH

然後運行

source ~/.bash_profile

source ~/.bashrc

3,   查看path的命令

printenv PATH | tr ":" "\n"


4,使用rvm安裝Rails


5, 安裝 Homebrew


使用vundle安裝vim的配置文件

Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
" ...
Bundle 'blackboard.vim'
Bundle 'ZenCoding.vim'
Bundle 'scrooloose/nerdtree'
nmap <F2> :NERDTreeToggle <CR>

Bundle "snipMate"
Bundle 'vim-ruby/vim-ruby'

Bundle 'ctags.vim'


brew 安裝 rails

  1. installed mysql with brew install mysql
  2. ran the commands brew suggested:

    unset TMPDIR
    
    mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  3. Start mysql with mysql.server command, to be able to log on it

  4. Used the alternate security script:

    /usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation

mysql管理工具 http://www.sequelpro.com


mac上可以安裝的軟件

  1. The Unarchiver: like WinRAR
  2. FreeMemory: to watch your memory usage and cleanup
  3. Appcleaner: for uninstall apps
  4. Wunderlist: a TODO
  5. Kindle:
  6. Evernote
  7. Dropbox
  8. Mindnode

發佈了198 篇原創文章 · 獲贊 8 · 訪問量 27萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章