科学の箱

科学・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

NICの初期化

ネットワークカードの設定 ifcfg-eth0を登録する。ファイルがなければ作成する # vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth …

no image

knife solo initコマンドでselect!が見つからないエラー

knife solo initコマンドを実行した際にselect!メソッドが見つからないエラーがでる。 $ knife solo init chef-repo Creating kitchen&#82 …

no image

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

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

no image

gem ssl error

gem install chef –no-ri –no-rdoc ERROR:  Could not find a valid gem ‘chef’ ( …

no image

SELinuxを無効にする

SELinuxが有効になっている場合には無効にする。SELinuxはセキュリティ上強固になる半面、設定が煩雑になる。特別な理由がなければあらかじめ無効にしておく。 SELinuxが有効になっているかを …

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

side bar top



アーカイブ

カテゴリー