download ruby-1.8.7

wget http://rubyforge.org/frs/download.php/55372/ruby-1.8.7-p160.tar.gz

install ruby

tar xzvf ruby-1.8.7-p160.tar.gz
cd ruby-1.8.7-p160
./configure –prefix=/opt/ruby –enable-pthread –without-openssl
make
make install

download gem
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz

install ruby gem

tar xzvf rubygems-1.8.24.tgz
cd rubygems-1.8.24
/opt/ruby/bin/ruby setup.rb

melihat modul apa saja yang sudah terinstall pada ruby-gem
/opt/ruby/bin/gem list

install modul-modul ruby-gem

/opt/ruby/bin/gem install actionmailer -v 2.3.5
/opt/ruby/bin/gem install rails -v 2.3.5
/opt/ruby/bin/gem install capistrano -v 2.5.21
/opt/ruby/bin/gem install chronic -v 0.3.0
/opt/ruby/bin/gem install crack -v 0.1.8
/opt/ruby/bin/gem install fastercsv -v 1.5.3
/opt/ruby/bin/gem install fastthread -v 1.0.7
/opt/ruby/bin/gem install highline -v 1.6.1
/opt/ruby/bin/gem install httparty -v 0.6.1
/opt/ruby/bin/gem install httpclient -v 2.1.5.2
/opt/ruby/bin/gem install json -v 1.4.6

yum install libxslt-devel (install ini dulu sebelum install nokogiri)

/opt/ruby/bin/gem install nokogiri -v 1.3.3
/opt/ruby/bin/gem install paperclip -v 2.3.3
/opt/ruby/bin/gem install activesupport -v 2.3.8
/opt/ruby/bin/gem install activesupport -v 2.3.5
/opt/ruby/bin/gem install paperclip -v 2.3.3
/opt/ruby/bin/gem install pg -v 0.9.0
/opt/ruby/bin/gem install RedCloth -v 4.2.3

yum install ImageMagick-c++-devel.x86_64 (install ini dulu sebelum install rmagick)

/opt/ruby/bin/gem install rmagick -v 2.5.1
/opt/ruby/bin/gem install ruby-postgres -v 0.7.1.2006.04.06 (jika
mengalami kegagalan saat installasi maka edit file /usr/include/libpq-fe.h sesuaikan dengan keadaan yang conflict saat itu dan juga tambahkan path berikut ini — –with-pgsql-include-dir=/usr/include/pgsql –with-pgsql-lib-dir=/usr/lib64/pgsql)

/opt/ruby/bin/gem install sanitize -v 1.1.0
/opt/ruby/bin/gem install soap4r -v 1.5.8
/opt/ruby/bin/gem install unicorn -v 1.1.2
/opt/ruby/bin/gem install will_paginate -v 2.3.14

untuk mengexport path agar user yang di inginkan dapat menjalankan ruby dan rails adalah dengan menambahkan PATH pada /home/detik/.bashrc tambahkan baris berikut

PATH=$PATH:/opt/ruby/bin
export PATH

selesai untuk install ruby nya

Advertisements