Install any version of ruby with RVM on mavericks

喜你入骨 提交于 2019-11-28 18:23:36
fsaravia

If you haven't upgraded Xcode after upgrading to Mavericks you should do so After that, open a command prompt and type:
xcode-select --install

This will install xcode command tools that have been deleted by OSX update. After that it should work okay.

The suggested solutions did not solve my issue (XCode at newest version, command line tools installed). I used rvm install ruby-1.9.3 --with-gcc=clang and that worked.

I thought rvm used to use clang for OSX by default. Not sure if I remember that wrong or something changed / this is no longer the best thing to do. Nevertheless it made the install work for me.

After Edu's comment, the github rvm issues page he referenced warns:

@marksands please be sure you know what you are duing, ruby 1.9.3 compiled with clang is not "safe", it can segfault, thread related issues to be expected, consider reinstalling ruby --with-gcc=gcc42 or just let rvm install gcc 4.6, only ruby 2.0.0 is fully compatible with clang

This issue points out issue with gcc46 on Mavericks:

The gem in question uses different language - not C/C++, it uses Objective-C - so it's not the compiler fault, you can build gcc-4.6 with support for Objective-C - it's just not done by default.

You have two options now, both start with uninstallig gcc-4.6 and then:

• Install apple-gcc42

• Install gcc-4.6 with --enable-objc

this is supposed to be fixed, run:

rvm get head
rvm remove 1.9.3
rvm install 1.9.3

do not use extra flags

What ended up working for me was installing XCode then RUNNING Xcode then trying to reinstall.

Running

rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

Corrected my compiler issue in Mavericks

Ran into the very same issue (on 10.8.5, all up to date). Ruby 2.0.0 installed fine, but not 1.9.3. This solution worked for me.

cd into the ruby path (found in config.log), then issue .configure (with all options, as found in config.log)

make
make install

Then:

rvm use 1.9.3 --create

Solution:

unset SDKROOT

This worked for me. I hope it would for you too.

I tried to reinstall xcode along with xcode developer tools. Didn’t work. The same error.

Try to run with env -i bash —noprofile —norc to see whether your env vars are causing the issue to further investigate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!