Mac OSX 10.10 Install Rails 4.1 Development Environment

安裝homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

會自動跳出Xcode擴充元件,再按確定安裝

更新 brew

brew update

用brew安裝一些套件

brew install git

brew tap homebrew/dupes

brew install apple-gcc42

brew install libyaml

安裝 xquartz

http://xquartz.macosforge.org/landing/

安裝 Imagemagick

brew install imagemagick

安裝MySQL

brew install mysql

啓動MySQl

mysql.server start

設定MySQL,例如:root 密碼

sudo mysql_secure_installation

安裝PostgresSQL

brew install postgresql

設定開機自動啟動

ln -sfv /usr/local/opt/postgresql/*plist ~/Library/LaunchAgents

啟動PostgresSQL

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

安裝 RVM

\curl -sSL https://get.rvm.io | bash

重新啟動終端機,讓RVM生效

RVM安裝 openssl

rvm pkg install openssl

安裝 Ruby 2.1.1

rvm install 2.1.1 --with-openssl-dir=$HOME/.rvm/usr --verify-downloads 1

RVM使用 ruby 2.1.1

rvm use 2.1.1

安裝Rails 最新版

gem install rails -v 4.1.7 --no-ri --no-rdoc

安裝自動部署工具capistrano

gem install capistrano

gem install capistrano-ext

安裝 pow

curl get.pow.cx | sh

安裝 Powder

gem install powder

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax