wlanboy
Content Contributer
Looking to the Ruby packages of Redhat, Debian, etc you will see that they are quite old. But you can install quite any version of Ruby (including JRuby, MacRuby, etc) with the help of rvm.io. Another advantage of rvm is that every user installs his own Ruby and his own set of gems. You are also able to install different versions of Ruby at the same time and switch between every installed version.
So let's install Ruby 2.0.0:
So let's install Ruby 2.0.0:
- Create .gemrc in your home folder to ensure that rdoc and ri are not installed for every gem (save space and time)
echo -e "install: --no-rdoc --no-ri\nupdate: --no-rdoc --no-ri" > ~/.gemrc
- Install rvm/ruby dependencies
Code:sudo apt-get install curl git git-core libcurl3 libcurl3-gnutls liberror-perl / libldap-2.4-2 libsasl2-2 libsasl2-modules libssh2-1 patch sudo apt-get install g++ gcc libc6-dev libreadline6 libreadline6-dev zlib1g-dev / libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev libxslt1-dev / autoconf libc6-dev libgdbm-dev ncurses-dev libncurses5-dev automake libtool bison / pkg-config libffi-dev openssl zlib1g zlib1g-dev
- Install rvm with local user
Code:curl -L https://get.rvm.io | bash -s stable
- Add rvm to your path (one time only - this is added to your .bashrc)
Code:source ~/.rvm/scripts/rvm
- Compile and install iconv and openssl to easy your life
Code:rvm pkg install iconv rvm pkg install openssl
- Browse list of available Ruby versions
Code:rvm list known
- Install Ruby
Code:rvm install 2.0.0
- Run Ruby
Code:ruby -v
Code:
apt-get install mysql-client-5.5 libmysqlclient15-dev