centostricks

Just another WordPress.com site

Upgrade Ruby for a particular user not affecting system ruby


Upgrade Ruby for a particular user not affecting system ruby

1. install for specific <User> Account

2. yum -y install git

3. sudo yum -y install zlib-devel openssl-devel openssl openssl097a

4. add the following to /home/<user>/.bashrc  or .bash_profile

unset RUBYLIB
export PATH=”$HOME/.rbenv/bin:$PATH”
eval “$(rbenv init -)”

5. install rbenv

git clone git://github.com/sstephenson/rbenv.git .rbenv

6. install ruby-build

git clone git://github.com/sstephenson/ruby-build.git

cd ruby-build;

vi install.sh | change the prefix to home directory(/home/<user>)
./install.sh

7. install ruby 1.8.7

rbenv-install 1.8.7-p358

8. set the version for your current directory or globally for that user

local –

rbenv local 1.8.7-p358

global

rbenv global 1.8.7-p358

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: