2

I have some issues with upgrading my Ruby version with RVM on OS X.

RMV uses MacPorts, causing me to run sudo port selfupdate, which gets a bunch of compiling errors, despite correct Xcode command line tools installed.

I found some installation instructions using Linux apt-get but unfortunately I don't have in it on my Mac.

I want to install Ruby without RVM. How can I do that?

4
  • 2
    Do you have Homebrew? See this: stackoverflow.com/questions/12287882/… Commented Jul 6, 2013 at 16:26
  • RVM has a whole page in its docs for MacPorts integration. Commented Jul 6, 2013 at 16:27
  • @AndrewMarshall thank you but I know about this page, and I always get the same error : command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install SELFUPDATING=1 Exit code: 2 DEBUG: Error installing new MacPorts base:...Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed Commented Jul 6, 2013 at 16:34
  • @superEb I think it is the best way to do, I knew about MacPorts having some compatibility pb with Lion``, and their official instructions don't do the trick for me. Thanks, I think I 'll use rbenv, which a rvm`-like tool. Perpahs, you should consider edit your post as the answer ;) Commented Jul 6, 2013 at 16:55

2 Answers 2

3

In case Macports does not work for you, try Homebrew:

rvm autolibs homebrew

Please note: Although it is not required, you might want to install Homebrew before using it with autolibs. It keeps Homebrew out of RVM directories.

Sign up to request clarification or add additional context in comments.

Comments

1

Using Homebrew, you can either install and manage a single version of Ruby:

brew update
brew install ruby

Or, even better, use rbenv as a flexible alternative to RVM:

brew update
brew install rbenv
brew install ruby-build
rbenv install 2.0.0-p247
rbenv rehash

rbenv then makes it easy to use a specific version of Ruby either globally or per project (which can then be added to source control).

Note that you may want to follow the advice from rbenv's "caveats" (brew info rbenv), particularly the part about adding eval "$(rbenv init -)" to your profile.

1 Comment

brew install ruby is all I ever want for my simple Ruby needs - I just use Ruby 2 for nanoc and the odd sysadmin script. I can easily update if necessary, and can aslo just dump all of Homebrew and its installs in one go if I ever need to. I used rvm for a couple of years, but it was way too much overkill and a little too problematic an install on new machines for my liking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.