1

I put 'rbenv install 1.9.2-p290' in the terminal and I get back 'rbenv-install: line 31: ruby-build: command not found'

I have ruby-build as well. Did I not install ruby-build correctly?

I see this on the github site: "You can install to a different prefix by setting the PREFIX environment variable." I'm not exactly sure what PREFIX is but does that mean I can install to another directory? Do I need to put ruby-build in a specific place?

Thanks, Jae

JKHan
  • 43
  • 1
  • 7
  • The docs say ruby-build installs to /usr/local. Is it there, and is /usr/local in your $PATH? – Jordan Running Sep 28 '11 at 23:29
  • ruby-build is in /usr/local. And I'm not sure if /usr/local is in my $PATH. Do I just put PATH=$PATH:/usr/local? Sorry noob here. – JKHan Sep 28 '11 at 23:51
  • What platform? You can see what's in `$PATH` by typing `echo $PATH`. In bash you add something to your path like `export PATH=$PATH:/usr/local/bin`. That will last for the length of your terminal session. Making it "permanent" depends on your platform. Here's a thread re: OS X: http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x/3756686#3756686 In Linux, well, go ahead and google around for your distribution. – Jordan Running Sep 29 '11 at 00:14
  • I'm on OS X 10.5.8 Leopard. I added /usr/local to $PATH, but I'm still getting that ruby-build error. – JKHan Sep 29 '11 at 01:38
  • When I type rbenv global it says 1.9.2-p290 but when I do ruby -v I still get 1.8.6. So do I still need to tweak something? – JKHan Sep 29 '11 at 14:11
  • Looks like, but I'm not sure what, sorry! – Jordan Running Sep 29 '11 at 17:37

1 Answers1

1

From a fresh terminal run which ruby-build. This will return the path to ruby-build provided it is in your path. If it is not in your path, it will return nothing. You need to edit your PATH variable such that ruby-build is found.

find where ruby-build is installed with find / -name "ruby-build". If you're sure it's in /usr/local you can use /usr/local instead of /.

Derek Prior
  • 3,497
  • 1
  • 25
  • 30