Install Ruby on Rails easily on CentOS 6.4 with rbenv

Open Terminal

Install git:

sudo yum install git

Install ruby environment with RBENV:

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

echo ‘export PATH=”$HOME/.rbenv/bin:$PATH”‘ >> ~/.bashrc

echo ‘eval “$(rbenv init -)”‘ >> ~/.bashrc

to check: restart terminal then type: type rbenv

If it say #=> “rbenv is a function” bla bla bla, it is successfull rbenv install

Install Ruby (2.1.2 version):

Install plugin ruby-build on rbenv:

https://github.com/sstephenson/ruby-build#readme

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

echo ‘export PATH=”$HOME/.rbenv/plugins/ruby-build/bin:$PATH”‘ >> ~/.bashrc

restart terminal

Install ruby 2.1.2 version:

rbenv install 2.1.2

then make it global ruby version on your local environment:

rbenv global 2.1.2

rehash the rbenv:

rbenv rehash

to check type: ruby

Install bundler:

gem install bundler

rehash the rbenv:

rbenv rehash

Install Rails:

First, you must install nodejs:

sudo yum install npm

check if it successfull: node –version

install rails:

gem install rails

long wait…

rehash the rbenv:

rbenv rehash

to check type: rails

Categories: IT | Tags: , , , , , | Leave a comment

Post navigation

Tinggalkan Jejakmu berupa komen

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

Create a free website or blog at WordPress.com.

%d bloggers like this: