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

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

    Check which version of gcc you have like this:

    ls -Al `which gcc-4.2`
    

    I followed the instructions here: http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion

    brew update
    brew tap homebrew/dupes
    brew install apple-gcc42
    

    Then reinstall:

    Check again what your path to gcc is (to use for CC=):

    ls -Al `which gcc-4.2`
    

    (optional) You can set this in your .bashrc for example:

    export CC=/usr/bin/gcc-4.2
    

    (optional) remove any old version of ruby

    rvm remove 1.8.7
    

    Then:

    CC=/usr/local/bin/gcc-4.2 rvm --verify-downloads 1 reinstall 1.8.7-p357 --without-tcl --without-tk 
    

    or if you have set CC in your profile

    rvm --verify-downloads 1 reinstall 1.8.7-p357 --without-tcl --without-tk 
    

    Note the flags on the rvm install. I had trouble verifying the checksum on the ftp server and some problems with tck and what not. You may be able to omit those flags.

    Also: you might need to remove an old version of your gemset:

    rvm gemset delete 
    

    Then

    gem install bundler
    bundle install
    

    Hope this helps.

提交回复
热议问题