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

后端 未结 14 1388
孤独总比滥情好
孤独总比滥情好 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:24

    If you have installed Xcode 4.2, it actually doesn't install non-LLVM gcc anymore, so you have to add it. For some reason downgrading to 4.1 after you've installed 4.2 doesn't work correctly (at least it didn't for me and others have had similar issues).

    After quite a bit of thrashing, this is what finally worked for me:

    1. Install Xcode 4.2 from App Store
    2. Install darwin gcc using the OSX gcc installer
    3. Install REE making sure you remove any vestiges of previous attempts:

    Close any open terminal windows, open a fresh one and

    rvm remove ree
    export CC=/usr/bin/gcc-4.2
    rvm install ree
    

    This worked for me with rvm 1.8.6, OS X 10.7.2 and gcc-4.2 version 4.2.1 (Apple build 5666).

    If you have already installed Xcode 4.1, resist the urge to upgrade to 4.2 and you should be okay.

提交回复
热议问题