In This tutorial i will show you how to install
- rbenve – ruby version manager
- ruby binary
- ruby-on-rails – framework
1 : Installing rbenv
Setup :
$ sudo apt-get update
$ sudo apt-get upgrade -y
Install Required Components For Ruby and other dependencies
$ sudo apt-get install git-core -y
$ sudo apt-get install curl -y
$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev
Clone rbenv
$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(rbenv init -)"' >> ~/.profile
( Note modify .bash_profile , .bash_login or .zshrc according to your need )
now install some required rbenv plugins
$ cd ~/.rbenv/
$ mkdir plugins
$ cd ~/.rbenv/plugins
$ git clone git://github.com/sstephenson/ruby-build.git
Restart Terminal
2 : Let’s Install Ruby
$ rbenv install 1.9.3-p385
Set Your Global Ruby version
$ rbenv global 1.9.3-p385
$ rbenv rehash
$ ruby -v
3 : Install Ruby-On-Rails Framework
$ gem install bundler
$ gem install rails
( dont panic installing rails will take some time )