Posts Tagged With: centos 6 install rails

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 ~/.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:

git clone ~/.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

Create a free website or blog at