Why can't I install Rails on Lion using RVM?

后端 未结 14 1382
孤独总比滥情好
孤独总比滥情好 2020-11-29 16:40

I\'m running into issues trying to install Rails on OS X Lion using RVM.

So far, I have done the following:

  1. Installed Mac OS X Lion Version 10.7 (Build
14条回答
  •  佛祖请我去吃肉
    2020-11-29 17:28

    I had the same issue on my system. I installed the Xcode command line tools from Apple which ships with LLVM compiler and without an LLVM free one.

    Ruby 1.8.7 won't work with an LLVM compiler not even with CC=clang, so installing an LLVM free gcc solves the problem.

    There are multiple options listed here:

    https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers

    Long story short, install GCC v4.2 with Homebrew:

    brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
    

    and then install ruby 1.8.7:

    CC=gcc-4.2 rvm install 1.8.7
    

提交回复
热议问题