3

Getting the following error when im trying to install ruby-2.1.2

rvm install ruby-2.1.2
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/12.04/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system................
Error running 'requirements_debian_update_system ruby-2.1.2',
showing last 15 lines of /usr/local/rvm/log/1400060285_ruby-2.1.2/update_system.log
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
    /etc/apt/sources.list
    /etc/apt/sources.list.d/*.list
++ return 100
bjhaid
  • 9,592
  • 2
  • 37
  • 47
bhb
  • 2,476
  • 3
  • 17
  • 32

5 Answers5

7
sudo apt-get install gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
Alexandre Abreu
  • 1,382
  • 1
  • 13
  • 28
1

I think your rvm is older version,

Install the latest (v1.25.25) rvm using:

$ \curl -L https://get.rvm.io | bash -s stable --ruby

then check the rubies available with this version:

$ rvm list known

then install the latest:

$ rvm install ruby-2.1.2

Note: Even if it does not show up in rvm list known it will try to download with the following message:

Installing Ruby from source to: /home/<YOUR_USER_NAME>/.rvm/rubies/ruby-2.1.2, this may take a while depending on your cpu(s)...

Devaroop
  • 7,900
  • 2
  • 37
  • 34
  • UPDATE: Your destination could also be `/usr/local/rvm` instead of `/home//.rvm/`. The former is multi-user and latter is single user rvm installs – Devaroop May 17 '14 at 10:36
1

This error in my case was cased because apt-get update gave a n error. After doing and manual sudo apt-get update I notices that one of the repos gave an error "W: Failed to fetch". After editing the repo list and removing the one that gave the error I was able to install.

Mihai Vinaga
  • 1,059
  • 2
  • 10
  • 27
  • Thanks, this worked for me. I went to "System->Preferences->Software & Updates", and disabled the PPA repositories that were generating the errors. – David Oliveros Jan 14 '15 at 01:14
0

Try to use this for install latest ruby

rvm mount -r https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p194.tar.bz2

for more help

rvm help mount
Dheer
  • 773
  • 1
  • 6
  • 16
0

I tried most of above answers but none works for me, so i just change server If you are using rvm for ruby then this will work.

  1. Goto directory etc/apt
  2. click on Sources.list
  3. Change the server to us or some else server
  4. Reload (it will update your cache from that server)
  5. Then run sudo apt-get update
  6. Finally run rvm install 2.3.0
Zia Qamar
  • 1,694
  • 1
  • 15
  • 35