LoginSignup
15
15

More than 5 years have passed since last update.

Ruby 1.9.3-p385インストール(Mac OS X 10.8.2)

Last updated at Posted at 2013-02-09

1. brewアップデート

brew update
----------
First, rewinding head to replay your work on top of it...
Fast-forwarded master to ffc0c3b7a16ef94c6d3ed8187e2542651e27db55.
Updated Homebrew from fe80973e to ffc0c3b7.
〜
----------

2. ruby-buildアップグレード

brew upgrade ruby-build
----------
==> Upgrading ruby-build
==> Installing ruby-build dependency: rbenv
==> Downloading https://github.com/sstephenson/rbenv/tarball/v0.4.0
######################################################################## 100.0%
Warning: The cleaning step did not complete successfully
Still, the installation was successful, so we will link it into your prefix
==> Caveats
To enable shims and autocompletion add to your profile:
  if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

To use Homebrew's directories rather than ~/.rbenv add to your profile:
  export RBENV_ROOT=/usr/local/opt/rbenv
==> Summary
/usr/local/Cellar/rbenv/0.4.0: 31 files, 160K, built in 4 seconds
==> Installing ruby-build
==> Downloading https://github.com/sstephenson/ruby-build/tarball/v20130208
######################################################################## 100.0%
==> ./install.sh
/usr/local/Cellar/ruby-build/20130208: 68 files, 300K, built in 3 seconds
----------

3. インストール可能リスト表示確認

rbenv install -l
----------
  1.9.3-p385
----------

4. Rubyインストール

  • readline/opensslインストール(未インストールであれば)
brew install readline openssl
  • Rubyインストール
CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 1.9.3-p385
----------
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/shu/.rbenv/versions/1.9.3-p385

Downloading ruby-1.9.3-p385.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz
Installing ruby-1.9.3-p385...
Installed ruby-1.9.3-p385 to /Users/shu/.rbenv/versions/1.9.3-p385
----------

rbenv install 1.9.3-p385だけだとBUILD FAILEDする

5. デフォルト使用設定

rbenv global 1.9.3-p385
ruby -v
----------
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin12.2.1]
----------

6. バージョン確認

rbenv versions
----------
  system
  1.9.3-p327
* 1.9.3-p385 (set by /Users/shu/.rbenv/version)
----------
rbenv version
----------
1.9.3-p385 (set by /Users/shu/.rbenv/version)
----------

7. bundler再インストール

gem i bundler
----------
Successfully installed bundler-1.2.3
1 gem installed
----------

8. インストールしたRubyやGemのパスを通す

rbenv rehash

9. 各RailsアプリでGemインストール

cd RAILS_ROOT
bundle install
15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15