MacにRubyをインストールする

2013年3月17日 Posted by PURGE

新しくMacBookAirを購入した為、開発環境を構築することとなった。その覚え書き。

まずは、rvm をインストールするのであるが、以前のrvmインストール方法とURLが変わったようである。

以前は、下記のようであったが、

bash << (curl -s https://rvm.beginrescueend.com/install/rvm)

現在は、下記の感じ。

curl -L https://get.rvm.io | bash -s stable

rvmをインストールすると、$HOME/.rvm 以下にインストールされるので、そこにPATHを通す為に、.bash_profile に記述する。

echo '[[ -s "$HOME/.rvm/scripts/rvm"]] && . "$HOME/.rvm/scripts/rvm" #Load RVM function' >> ~/.bash_profile

そして、rvmでruby1.9.3 をインストールする。

rvm install 1.9.3

Fetching yaml-0.1.4.tar.gz to /Users/tajihiro/.rvm/archives
Extracting yaml to /Users/xxx/.rvm/src/yaml-0.1.4
Error running '__rvm_package_extract /Users/xxx/.rvm/archives/yaml-0.1.4.tar.gz /Users/xxx/.rvm/src', please read /Users/xxx/.rvm/log/ruby-1.9.3-p392/yaml/extract.log
There has been an error while trying to extract the source. Halting the installation.
Installing Ruby from source to: /Users/xxx/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.3-p392 - #extracting ruby-1.9.3-p392 to /Users/tajihiro/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #extracted to /Users/xxx/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #configuring
ruby-1.9.3-p392 - #compiling
Error running 'make', please read /Users/xxx/.rvm/log/ruby-1.9.3-p392/make.log
There has been an error while running make. Halting the installation.

しかし、エラー。

そこで、諦めて brew にて、ruby をインストールしてみる。rvmは使用しないことにした。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です