0

I've installed ruby-install like this:

brew install ruby-install

But, when I try to install ruby it fails:

$ ruby-install ruby
>>> Installing ruby 2.1.1 into /Users/mishamoroshko/.rubies/ruby-2.1.1 ...
>>> Installing dependencies for ruby 2.1.1 ...
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package build-essential
!!! Installing dependencies failed!

I'm on Mac OSX 10.9.2.

Any ideas?

Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
  • Have you run `apt-get update` first? Then have a look at this: http://askubuntu.com/questions/398489/how-to-install-build-essential – lucke84 Mar 14 '14 at 11:33
  • @lucke84: `sudo apt-get update` completely fails: http://dl.dropbox.com/u/1893981/Screenshots/mfe3.png (I think `apt-get` is not used much on OSX. Should I try and uninstall it, or it's probably not a good idea if it comes with OSX?) – Misha Moroshko Mar 14 '14 at 11:46
  • My bad, haven't read the Mac OSX part. Apt is a ubuntu thing. Have you had a look at this? http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ – lucke84 Mar 14 '14 at 12:14
  • I ended up removing `apt-get`, and it solved the problem. – Misha Moroshko Mar 14 '14 at 12:25
  • Can you post an answer with that? Your last comment is not particularly clear. :) – lucke84 Mar 14 '14 at 13:14

1 Answers1

0

Apparently, apt-get was the first in ruby-install's package manager detection order. It was broken on my system, and this is why the error.

After I removed apt-get from my system, ruby-install picked up Homebrew and the error disappeared.

Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746