Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

Looks like ruby-lang.org has been going on and off line for a couple of hours now.

ruby-lang status: http://www.ruby-lang.org/en/news/2013/08/06/status-issue/

GitHub Issue: https://github.com/ruby/www.ruby-lang.org/issues/259

I had this same problem, and I was able to work around it by editing the ruby-build recipe for the particular version of Ruby I needed to download.

I installed ruby-build as an rbenv plugin, so the recipe lives here:

~/.rbenv/plugins/ruby-build/share/ruby-build

Here's the edited version of the recipe:

install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "ruby-1.9.3-p448" "http://mirrors.ibiblio.org/ruby/1.9/ruby-1.9.3-p448.tar.gz#a893cff26bcf351b8975ebf2a63b1023"
#install_package "ruby-1.9.3-p448" "ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz#a893cff26bcf351b8975ebf2a63b1023"

I did not try this, but you might be able to achieve a similar result by following the instructions for specifying package download mirrors.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top