Mountain Lion 㧠Ruby 2.0 + Ruby on Rails 4 ãå°å ¥ãã
ãããåèã«é²ãã¦ã¿ãã
http://qiita.com/items/88746e6e328a1533ccfe
Command Line Tools for Xcode ãã¤ã³ã¹ãã¼ã«ãã
大ä½ãè²ããªã½ãããå ¥ããã®ã«ã³ã³ãã¤ã©ãå¿ è¦ã«ãªã£ã¦ããã®ã§ãCommand Line Tools ãå ¥ãã¾ãã
ä¸è¨ã®ãªã³ã¯ãã Apple ID ã§ãã°ã¤ã³ããã¤ã³ã¹ãã¼ã©ããã¦ã³ãã¼ããã¾ãã
https://developer.apple.com/downloads/index.action
Mac ã®ããã±ã¼ã¸ç®¡çã homebrew ãã¤ã³ã¹ãã¼ã«ãã
http://www.karakaram.com/install-homebrew-mac
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
rbrevãruby-build ãã¤ã³ã¹ãã¼ã«ãã
rbrev ã¯ãruby ã®ãã¼ã¸ã§ã³ãåãæ¿ãããåºæ¥ããã®ã§ãã
ruby-build ã¯ãruby ã®ãã«ãã«å©ç¨ãã¾ãã
$ brew install rbenv
$ brew install ruby-build
opensslãreadline ãã¤ã³ã¹ãã¼ã«ãã
OpenSSL㯠Ruby ã§OpenSSLãå©ç¨ããéçºã«å©ç¨ããããã«å ¥ãã¾ãã
readline㯠irb ã§æ¥æ¬èªã使ãããã«å¿ è¦ãªã®ã§å ¥ãã¾ãã
$ brew install openssl
$ brew install readline
$ brew link openssl readline
brew 㧠openssl ãå ¥ããæã«ã証ææ¸ã¨ã©ã¼ãçºçãããããªã®ã§ãä¸è¨ã®ãªã³ã¯ãåèã« curl-ca-bundle ãå ¥ãã¾ãã
http://qiita.com/items/12457815d5cee3723b97
$ brew install curl-ca-bundle
$ brew list curl-ca-bundle
/usr/local/Cellar/curl-ca-bundle/1.87/share/ca-bundle.crt
$ cp /usr/local/Cellar/curl-ca-bundle/1.87/share/ca-bundle.crt /usr/local/etc/openssl/cert.pem
rbenv ãå©ç¨ã㦠Ruby 2.0.0-p0 ã¤ã³ã¹ãã¼ã«ãã
opensslãreadlineã®ãªãã·ã§ã³æå®ã§ã¤ã³ã¹ãã¼ã«ãè¡ãã¾ãã
$ RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p0
Ruby2.0 ãæå¹ã«ãã
$ rbrev global 2.0.0-p0
$ ruby -v
2.0.0-p0 ã¨åºããRubyã®ã¤ã³ã¹ãã¼ã«ã¯å®äºã§ãã
bundler ãå ¥ãã
Gemfile ãèªã¿è¾¼ãã§ å¿ è¦ãª gem ãå ¥ããã©ã¤ãã©ãªã§ãã
rails ã§ããã¸ã§ã¯ãä½ææã«å¿ è¦ãªã®ã§ãå ¥ãã¾ãã
$ gem install bundler
rails ãã¤ã³ã¹ãã¼ã«ãã
$ gem install rails -v 4.0.0.beta1
rails ããã¸ã§ã¯ããä½æãã
$ rails new rails-example
ããã¾ã§ã