Problem installing Ruby 1.9.2 on Mac OS Lion

前端 未结 3 630
不思量自难忘°
不思量自难忘° 2021-01-12 20:30

I am running Lion, utilizing Xcode 4, have RVM and homebrew installed but am only able to run ruby 1.8.7

    spurvis:~ rogue$ ruby -v
    ruby 1.8.7 (2010-01-10 p         


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-12 20:49

    Make sure you have the latest xcode available (you'll need to update it if you're running a copy from snow leopard. Update RVM rvm get head and then try again.

    I had problems compiling ree but 1.9.2 worked fine, you can try adding this function to .profile in your home directory, it'll compile with gcc (instead of the default LLVM)

    # using_gcc for 64btt compiling on lion (solves compatability issues)
    function using_gcc() {
      env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_64" ARCHS="x86_64" $*
    }
    

    Then run using_gcc rvm install 1.9.2

提交回复
热议问题