科学の箱

科学・IT・登山の話題

CentOS Ruby

Rubyをインストールする

投稿日:

Ruby環境はrbenvで構築するとバージョン管理が楽になる。

rbenvのインストール

こちらを参考にしてrbenvをインストールする

gitからrbenvを取得する。

# git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

環境変数を修正する。この辺はgitに説明が記載されている。

# echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
# echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
# source ~/.bash_profile

rbenvがインストールされたことを確認する。

# type rbenv
rbenv is a function

 ruby-buildをインストール

こちらを参考に指定ruby-buildをインストールする

gitからruby-buildを取得する

git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
cd ~/.rbenv/plugins/ruby-build
./install.sh

インストールを確認する

# rbenv install -l
Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249

Rubyをインストールする

rbenv経由でrubyをインストーする

# rbenv install 1.9.3-p547

メタ情報

inarticle



メタ情報

inarticle



-CentOS, Ruby
-

執筆者:


comment

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

関連記事

no image

cpuに負荷をかけるためのスクリプト

CPUに負荷をかけてテストをしたいときのスクリプト while true; do for i in 1 2 3 4; do while : ; do : ; done & done ; don …

no image

VMWare上で動いているCent OSからパーティションの拡張ができない件

めんどうくさい、下記のページに方法が記載されている。 http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038 …

no image

eth0がeth1として表示され手いる際の対応

VMWareでネットワークカードのテストを繰り返しているとあるタイミングでeth0がeth1としてifconfigで表示されるようになる。 /etc/sysconfig/network-scripts …

no image

Cent OSでdistributionを確認する方法

Cent OSでdistributionを確認するためのコマンドを記録する。 cat /etc/issue cat /etc/redhat-release uname -a lsb_release – …

no image

ユーザーの設定

ユーザーの管理 ルートパスワード変更 passwd root 作業ユーザー設定 作業ユーザーを設定後にsuでroot権限を取得できることを確認しておく。 useradd worker1 passwd …

2014年9月
« 8月   10月 »
1234567
891011121314
15161718192021
22232425262728
2930  

side bar top



アーカイブ

カテゴリー