Rasberry Pi: Upgrade Ruby to Latest Version
Basicly the ruby in Raspberry Pi is using old version of Ruby.
So let's upgrade our Ruby to latest version.
1. Check version of current use ruby
$ which ruby
/usr/bin/ruby
$ readlinl -f /usr/bin/ruby
/usr/bin/ruby2.1
$ dpkg -S /usr/bin/ruby2.1
ruby2.1: /usr/bin/ruby2.1
2. Uninstall current use ruby
$ apt-get purge ruby2.1
3. Install latest ruby using RVM
Get the key server. (Can get from here: https://rvm.io/ )
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
4. Download RVM
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
4. Show list version of ruby
$ rvm list known
5. Install the lastest ruby version
$ rvm install 2.3.3
6. After done install check the ruby version is use
$ ruby -v
Done. You should have the latest version of ruby.