rbenv install 2.0.0-p451 fails
I'm Using a Macbook Pro with OS X 10.9.2 and rbenv+ruby-build is installed from Homebrew. I run "rbenv install 2.0.0-p451" and get the following error message:
Downloading ruby-2.0.0-p451.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/9227787a9636551f1749ee8394b5ffe5
Installing ruby-2.0.0-p451...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501134356.1186
Results logged to /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501134356.1186.log
Last 10 log lines:
1 warning generated.
linking shared-object nkf.bundle
installing default openssl libraries
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
1 warning generated.
linking shared-object date_core.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
make: *** [build-ext] Error 2
Most likely related to problems between ruby and readline v6.3. Follow this workaround and see if it solves your problem: https://github.com/sstephenson/ruby-build/issues/550#issuecomment-41198679
I know patches have been extracted from ruby trunk for v2.1.1 but I'm unaware if anyone has done the same for 2.0.0, but simply downgrading readline back to v6.2, should fix your problem. Assuming it is indeed readline related.
The fix in #550 worked for me to resolve it.
Just FYI, I made a patch to fix this: So, just doing:
rbenv install --patch 2.0.0-p451 < <(curl -sSL https://gist.githubusercontent.com/neeravkumar/f2409a4a2397c7cf6a61/raw/gistfile1.diff)
should work.
Please update latest version of ruby-build, and build Ruby 2.0.0-p481.
rbenv update fixed this for me
brew update && brew upgrade ruby-build && brew upgrade readline && rbenv install 2.0.0-p451 worked for me!