Ruby 2 for Debian Wheezy
Debian Wheezy provides Ruby version 1.9.3.
If you want to install a newer version, you need to do that manually.
But you don't want to mess with your system Ruby.
There are Ruby version managers like
rbenv to solve that problem.
Unfortunately, Debian's rbenv is out of date as well.
You will need to install a newer version of rbenv and the ruby-build plugin.
You can install the latest rbenv in your home directory. Execute the following commands as normal user, not as root.
# Backup your .rbenv folder if you have any test -e "$HOME/.rbenv" && mv "$HOME/.rbenv" "$HOME/.rbenv.debian" # Get the newest rbenv and the ruby-build plugin git clone https://github.com/sstephenson/rbenv.git $HOME/.rbenv git clone https://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build # Use the new rbenv PATH="$HOME/.rbenv/bin:$PATH" echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bashrc # List available Ruby versions rbenv install -l # Install a newer Ruby version rbenv install 2.4.1 # Use the new Ruby version rbenv global 2.4.1 source ~/.bashrc