Ruby開発環境構築(Mac編)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
** Ruby On Rails 2.3.14インストール(Mac OS 10.6.8 Snow L...
- Rubyのバージョン確認
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin...
- インストール可能な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, ...
- バージョン(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最新版インストール [#r724...
$ 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 2...
Receiving objects: 100% (34252/34252), 5.85 MiB | 270 Ki...
Resolving deltas: 100% (23657/23657), done.
$ cd rvm
$ ./install
Installing RVM to /Users/yujishimojo/.rvm/
Adding rvm PATH line to /Users/yujishimojo/.bashrc /...
Adding rvm loading line to /Users/yujishimojo/.bash_...
grep: /etc/rvmrc: No such file or directory
# RVM: Shell scripts enabling management of multiple ru...
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm ...
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use...
# In case of any issues read output of 'rvm requirements...
Installation of RVM in /Users/yujishimojo/.rvm/ is almos...
* To start using RVM you need to run `source /Users/yu...
in all your open shell windows, in rare cases you nee...
# yujishimojo,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life ea...
# 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...
Continuing with compilation. Please read 'rvm mount' to ...
Fetching yaml-0.1.4.tar.gz to /Users/yujishimojo/.rvm/ar...
########################################################...
Extracting yaml to /Users/yujishimojo/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/yujishimojo/.rvm/src/yaml-0.1...
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/...
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may...
########################################################...
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /Users/...
ruby-1.9.2-p320 - #extracted to /Users/yujishimojo/.rvm/...
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing
Retrieving rubygems-1.8.24
########################################################...
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 ...
ruby-1.9.2-p320 - #importing default gemsets, this may t...
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 insta...
<= 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
終了行:
** Ruby On Rails 2.3.14インストール(Mac OS 10.6.8 Snow L...
- Rubyのバージョン確認
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin...
- インストール可能な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, ...
- バージョン(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最新版インストール [#r724...
$ 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 2...
Receiving objects: 100% (34252/34252), 5.85 MiB | 270 Ki...
Resolving deltas: 100% (23657/23657), done.
$ cd rvm
$ ./install
Installing RVM to /Users/yujishimojo/.rvm/
Adding rvm PATH line to /Users/yujishimojo/.bashrc /...
Adding rvm loading line to /Users/yujishimojo/.bash_...
grep: /etc/rvmrc: No such file or directory
# RVM: Shell scripts enabling management of multiple ru...
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm ...
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use...
# In case of any issues read output of 'rvm requirements...
Installation of RVM in /Users/yujishimojo/.rvm/ is almos...
* To start using RVM you need to run `source /Users/yu...
in all your open shell windows, in rare cases you nee...
# yujishimojo,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life ea...
# 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...
Continuing with compilation. Please read 'rvm mount' to ...
Fetching yaml-0.1.4.tar.gz to /Users/yujishimojo/.rvm/ar...
########################################################...
Extracting yaml to /Users/yujishimojo/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/yujishimojo/.rvm/src/yaml-0.1...
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/...
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may...
########################################################...
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /Users/...
ruby-1.9.2-p320 - #extracted to /Users/yujishimojo/.rvm/...
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing
Retrieving rubygems-1.8.24
########################################################...
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 ...
ruby-1.9.2-p320 - #importing default gemsets, this may t...
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 insta...
<= 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
ページ名: