Search code examples
rubyinstallationruby-1.9.3rbenv

rbenv install fails because of ruby-lang.org layout change (or permanent failure?)


Of all the days I chose today to switch from rvm to rbenv. All went well far enough, there are good tutorials on this, but the fun stopped when I tried to install ruby 1.9.3.

rbenv install 1.9.3

proposed to install 1.9.3-p448 as the current version which seems ok to me, so I tried

rbenv install 1.9.3-p448

and went down from there on. It will look up something on ...cloudfront.net and then tried to fetch ruby-1.9.3-p448.tar.gz from the "usual location" which it considers to be

http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz

which fails with

/usr/local/bin/ruby-build: line 144: pushd: ruby-1.9.3-p448: No such file or directory

plus a final 404-error and a host of followup error messages.

As it turns out the link above is identical to the one published on http://www.ruby-lang.org/en/downloads/ which I would consider as "official" a link as you might find for Ruby. So if you go to ruby-lang.org manually (or using the link above) you will also find a broken download (as of 2013-08-06 17:06)!

I guess this is a temporary issue and the downloads will return (2.0.0 link is also broken by the way). Not to much of a problem for me at the moment as 1.9.2 can still be installed (and I am stuck with that at my current hosting provider ...), but anyways: Are there any other options I would have to install a ruby with rbenv without these "official" distributions?


Solution

  • just tested overriding the mirror for ruby-build in cap...

    rbenv uses ruby-build. You can override the mirror in ruby-build url in 2 ways:

    1. Specifying a custom ruby version (requires you to write out a config in ruby-build/share/ruby-build/my-custom-ruby
    2. Overriding the mirror url (requires the checksum to be the same), i.e., RUBY_BUILD_MIRROR_URL= http://mirrors.ibiblio.org/ruby/2.0/ruby-2.0.0-p247.tar.gz

      env RUBY_BUILD_MIRROR_URL=http://mirrors.ibiblio.org/ruby/2.0/ruby-2.0.0-p247.tar.gz ~/.rbenv/bin/rbenv install 2.0.0-p247