error: failed to build gem native extension when installing rails on mac mountian lion os

后端 未结 4 1336
谎友^
谎友^ 2020-12-05 04:39

I\'ve recently updated to Mountain Lion and re-installed Ruby, but when I try to run a test Rails app, I get an error message that says that \"Rails is not currently install

4条回答
  •  眼角桃花
    2020-12-05 04:55

    I ran into this issue as well, with Mountain Lion. The gem that was failing installation was json. To fix it, I installed the xcode CLI tools and then just symlinked the installed gcc (i686-apple-darwin11-llvm-gcc-4.2) as /usr/bin/gcc-4.2. Once this was done, it just worked.

    While trying to install another gem, I ran into a similar issue where the native build step complained about missing g++-4.2. I symlinked this exactly the same as I did with gcc-4.2 above, and it worked.

    UPDATE: OSX Mavericks with latest RVM

    With the latest OSX 10.9 and latest RVM, these issues seem to have gone away. So, time to upgrade.

提交回复
热议问题