Ruby On Rails 2.3.14インストール(Mac OS 10.6.8 Snow Leopard)

  • Rubyのバージョン確認
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin10.0]
  • インストール可能なRails全バージョンを表示
$ gem query --remote --all --name-matches "^rails$"

*** REMOTE GEMS ***

rails (3.2.9, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.8, 3.1.7, 3.1.6, 3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.17, 3.0.16, 3.0.15, 3.0.14, 3.0.13, 3.0.12, 3.0.11, 3.0.10, 3.0.9, 3.0.8, 3.0.7, 3.0.6, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.14, 2.3.12, 2.3.11, 2.3.10, 2.3.9, 2.3.8, 2.3.7, 2.3.6, 2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.4, 2.0.2, 2.0.1, 2.0.0, 1.2.6, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.0, 0.14.4, 0.14.3, 0.14.2, 0.14.1, 0.13.1, 0.13.0, 0.12.1, 0.12.0, 0.11.1, 0.11.0, 0.10.1, 0.10.0, 0.9.5, 0.9.4.1, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9.0, 0.8.5, 0.8.0)
  • バージョン(2.x系の最新)を指定してRailsをインストール
$ sudo gem install rails --version 2.3.14
Successfully installed activesupport-2.3.14
Successfully installed activerecord-2.3.14
Successfully installed rack-1.1.3
Successfully installed actionpack-2.3.14
Successfully installed actionmailer-2.3.14
Successfully installed activeresource-2.3.14
Successfully installed rails-2.3.14
7 gems installed
Installing ri documentation for activesupport-2.3.14...
Installing ri documentation for activerecord-2.3.14...
Installing ri documentation for rack-1.1.3...
Installing ri documentation for actionpack-2.3.14...
Installing ri documentation for actionmailer-2.3.14...
Installing ri documentation for activeresource-2.3.14...
Installing ri documentation for rails-2.3.14...
Installing RDoc documentation for activesupport-2.3.14...
Installing RDoc documentation for activerecord-2.3.14...
Installing RDoc documentation for rack-1.1.3...
Installing RDoc documentation for actionpack-2.3.14...
Installing RDoc documentation for actionmailer-2.3.14...
Installing RDoc documentation for activeresource-2.3.14...
Installing RDoc documentation for rails-2.3.14...
  • Railsバージョン確認
$ rails --version
Rails 2.3.14

RVMを利用してRuby 1.9.2/Rails最新版インストール

$ git clone git://github.com/wayneeseguin/rvm.git
Cloning into rvm...
remote: Counting objects: 34252, done.
remote: Compressing objects: 100% (9134/9134), done.
remote: Total 34252 (delta 23657), reused 33693 (delta 23150)
Receiving objects: 100% (34252/34252), 5.85 MiB | 270 KiB/s, done.
Resolving deltas: 100% (23657/23657), done.
$ cd rvm
$ ./install
Installing RVM to /Users/yujishimojo/.rvm/
    Adding rvm PATH line to /Users/yujishimojo/.bashrc /Users/yujishimojo/.zshrc.
    Adding rvm loading line to /Users/yujishimojo/.bash_profile /Users/yujishimojo/.zprofile.
grep: /etc/rvmrc: No such file or directory

# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Installation of RVM in /Users/yujishimojo/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/yujishimojo/.rvm/scripts/rvm`
   in all your open shell windows, in rare cases you need to reopen all shell windows.

# yujishimojo,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and
#   more enjoyable!!!
#
# ~Wayne
  • 「.bashrc」に以下を追加
$ vi .bashrc
source ~/.rvm/scripts/rvm
  • rvmからインストール可能なRubyのバージョンを確認
$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p371]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3-p125
[ruby-]1.9.3-p194
[ruby-]1.9.3-p286
[ruby-]1.9.3-p327
[ruby-]1.9.3[-p362]
[ruby-]1.9.3-head
[ruby-]2.0.0-preview2
ruby-head
...
  • Ruby 1.9.2をインストール
$ rvm install 1.9.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.6/i386/ruby-1.9.2-p320.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/yujishimojo/.rvm/archives
######################################################################## 100.0%
Extracting yaml to /Users/yujishimojo/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/yujishimojo/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/yujishimojo/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/yujishimojo/.rvm/usr
Installing Ruby from source to: /Users/yujishimojo/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /Users/yujishimojo/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #extracted to /Users/yujishimojo/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing 
Retrieving rubygems-1.8.24
######################################################################## 100.0%
Extracting rubygems-1.8.24 ...
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
Installation of rubygems completed successfully.
Saving wrappers to '/Users/yujishimojo/.rvm/bin'.
ruby-1.9.2-p320 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p320 - #importing default gemsets, this may take time ...
Install of ruby-1.9.2-p320 - #complete 
  • 最新版のRailsをインストール
$ gem install rails
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.5.0.gem (100%)
Fetching: activesupport-3.2.9.gem (100%)
Fetching: builder-3.0.4.gem (100%)
Fetching: activemodel-3.2.9.gem (100%)
Fetching: rack-1.4.1.gem (100%)
Fetching: rack-cache-1.2.gem (100%)
Fetching: rack-test-0.6.2.gem (100%)
Fetching: journey-1.0.4.gem (100%)
Fetching: hike-1.2.1.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sprockets-2.2.2.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-3.2.9.gem (100%)
Fetching: arel-3.0.2.gem (100%)
Fetching: tzinfo-0.3.35.gem (100%)
Fetching: activerecord-3.2.9.gem (100%)
Fetching: activeresource-3.2.9.gem (100%)
Fetching: mime-types-1.19.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.12.gem (100%)
Fetching: mail-2.4.4.gem (100%)
Fetching: actionmailer-3.2.9.gem (100%)
Fetching: rack-ssl-1.3.2.gem (100%)
Fetching: thor-0.16.0.gem (100%)
Fetching: json-1.7.5.gem (100%)
Building native extensions.  This could take a while...
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.9.gem (100%)
Fetching: rails-3.2.9.gem (100%)
Successfully installed i18n-0.6.1
Successfully installed multi_json-1.5.0
Successfully installed activesupport-3.2.9
Successfully installed builder-3.0.4
Successfully installed activemodel-3.2.9
Successfully installed rack-1.4.1
Successfully installed rack-cache-1.2
Successfully installed rack-test-0.6.2
Successfully installed journey-1.0.4
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.2.2
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.9
Successfully installed arel-3.0.2
Successfully installed tzinfo-0.3.35
Successfully installed activerecord-3.2.9
Successfully installed activeresource-3.2.9
Successfully installed mime-types-1.19
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.12
Successfully installed mail-2.4.4
Successfully installed actionmailer-3.2.9
Successfully installed rack-ssl-1.3.2
Successfully installed thor-0.16.0
Successfully installed json-1.7.5
Successfully installed rdoc-3.12
Successfully installed railties-3.2.9
Successfully installed rails-3.2.9
29 gems installed
Installing ri documentation for i18n-0.6.1...
Installing ri documentation for multi_json-1.5.0...
Installing ri documentation for activesupport-3.2.9...
Installing ri documentation for builder-3.0.4...
Installing ri documentation for activemodel-3.2.9...
Installing ri documentation for rack-1.4.1...
Installing ri documentation for rack-cache-1.2...
Installing ri documentation for rack-test-0.6.2...
Installing ri documentation for journey-1.0.4...
Installing ri documentation for hike-1.2.1...
Installing ri documentation for tilt-1.3.3...
Installing ri documentation for sprockets-2.2.2...
Installing ri documentation for erubis-2.7.0...
Installing ri documentation for actionpack-3.2.9...
Installing ri documentation for arel-3.0.2...
Installing ri documentation for tzinfo-0.3.35...
Installing ri documentation for activerecord-3.2.9...
Installing ri documentation for activeresource-3.2.9...
Installing ri documentation for mime-types-1.19...
Installing ri documentation for polyglot-0.3.3...
Installing ri documentation for treetop-1.4.12...
Installing ri documentation for mail-2.4.4...
Installing ri documentation for actionmailer-3.2.9...
Installing ri documentation for rack-ssl-1.3.2...
Installing ri documentation for thor-0.16.0...
Installing ri documentation for json-1.7.5...
Installing ri documentation for rdoc-3.12...
Installing ri documentation for railties-3.2.9...
Installing ri documentation for rails-3.2.9...
Installing RDoc documentation for i18n-0.6.1...
Installing RDoc documentation for multi_json-1.5.0...
Installing RDoc documentation for activesupport-3.2.9...
Installing RDoc documentation for builder-3.0.4...
Installing RDoc documentation for activemodel-3.2.9...
Installing RDoc documentation for rack-1.4.1...
Installing RDoc documentation for rack-cache-1.2...
Installing RDoc documentation for rack-test-0.6.2...
Installing RDoc documentation for journey-1.0.4...
Installing RDoc documentation for hike-1.2.1...
Installing RDoc documentation for tilt-1.3.3...
Installing RDoc documentation for sprockets-2.2.2...
Installing RDoc documentation for erubis-2.7.0...
Installing RDoc documentation for actionpack-3.2.9...
Installing RDoc documentation for arel-3.0.2...
Installing RDoc documentation for tzinfo-0.3.35...
Installing RDoc documentation for activerecord-3.2.9...
Installing RDoc documentation for activeresource-3.2.9...
Installing RDoc documentation for mime-types-1.19...
Installing RDoc documentation for polyglot-0.3.3...
Installing RDoc documentation for treetop-1.4.12...
Installing RDoc documentation for mail-2.4.4...
Installing RDoc documentation for actionmailer-3.2.9...
Installing RDoc documentation for rack-ssl-1.3.2...
Installing RDoc documentation for thor-0.16.0...
Installing RDoc documentation for json-1.7.5...
Installing RDoc documentation for rdoc-3.12...
Installing RDoc documentation for railties-3.2.9...
Installing RDoc documentation for rails-3.2.9...
  • Railsのバージョン確認
$ rails -v
Rails 3.2.9

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2013-08-10 (土) 01:52:35 (1925d)