6

Attempting to use RVM on a Mac OS X 10.5.8.

> rvm install ruby-1.8.7-p334
ERROR: 
You passed the --clang option and clang is not in your path. 
Please try again or do not use --clang.

I have little idea what this error is about; looking in the RVM script leads nowhere. No luck on google finding this error string. 1.8.7 is in "rvm list known".

Anyone seen this before?

1
  • I just saw this too on Ubuntu on a new install of RVM (I've never had issues before). I tried apt-getting clang just to see what would happen, and while that let rvm get further, it eventually failed installing ruby anyway. I'm guessing the rvm folks messed up their argument defaults.
    – user24359
    Apr 21, 2011 at 4:44

5 Answers 5

4

I don't know the solution, but it appears to be a brand new problem that was recently reported on the mailing list as well:

http://groups.google.com/group/rubyversionmanager/browse_thread/thread/228d9cd4cf250f68/ec09c7051c8b6e37?show_docid=ec09c7051c8b6e37

You can work around it by installing clang:

sudo apt-get install clang

But, the notes mention nothing about clang being a dependency, and so this may be a result of a bug.

1
  • Definitely a bug. clang is not required.
    – Telemachus
    Apr 21, 2011 at 15:49
4

So, this is definitely a bug in the latest release. My advice (especially since you're not using edge Ruby) is to revert to an old version.

rvm implode
yes

Next, use the following command to install via a specific source version:

curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer 1.6.0

Note, I've chosen v1.6.0 (it's currently 1.6.3). I was running into a similar problem, and this fixed it for me...

3

In case you're talking about version 1.6.3, I'm experiencing the same problem and got it to install ruby 1.9.2 by commenting line 506 in .rvm/scripts/selector saying __rvm_default_flags

This function seems to set faulty clang-related defaults

1
  • Yeah, that plus the test in .rvm/scripts/env == boom. See my answer for the other half of the puzzle (I think).
    – Telemachus
    Apr 21, 2011 at 15:32
1

I believe the problem is this commit, specifically the changes to .rvm/scripts/env.

Editing .rvm/scripts/manage is one way to fix the problem (see flitzwald's answer for another way to do it):

  20 __rvm_check_for_clang()
  21 {
  22   if [[ "${rvm_clang_flag}" -eq 1 ]] && ! command -v clang >/dev/null ; then  
  23     rvm_error "\nYou passed the --clang option and clang is not in your path. \nPlease try again or do not use --clang.\n"
  24     return 1
  25   fi
  26 }

($rvm_clang_flag is set to 1 when you call for it in .rvm/scripts/cli. The error is being falsely tripped now because the flag's default settings and the test for the flag don't match up.)

Edit: Just a follow-up note. It was a bug; it's been fixed. If you come by here via Google, rvm get head && rvm reload and all should be well again.

1

Just tried this - and it's sorted that issue out... BUT - you meant edit scripts/manage, not scripts/env I think ;)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.