So, I've looked into other questions on StackOverflow here and here, and I found out it was because of the version of Ruby that I had. Even if I installed the latest RVM, I had to install the correct version of Ruby by running the command:
sudo apt-get install ruby1.9.1-dev
Solved my problem. :)