Getting Ruby 1.8.7 installed on Mountain Lion (10.8)

后端 未结 3 1220
夕颜
夕颜 2020-12-25 07:56

I\'m having a lot of trouble getting Ruby 1.8.7 installed on my clean install of Mountain Lion. I\'ve looked around on Stack Overflow and don\'t see anything that specifical

相关标签:
3条回答
  • 2020-12-25 08:40

    I just figured it out! Please reference this question on SO

    rvm can no longer install 1.8.7-p352 on Mac OS X Mountain Lion

    rvm reinstall 1.8.7 --without-tcl --without-tk
    

    Alternatively, try this installation order if you have Homebrew.

    brew install tcl-tk
    
    rvm reinstall 1.8.7
    
    0 讨论(0)
  • 2020-12-25 08:45

    Just to follow up to Paul's post. I'm running OSX 10.8.2, had 1.9.3 install without issues, but 1.8.7-p370 also failed. I symlinked gcc-4.2:

    sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
    

    ...successfully ran:

    brew install tcl
    

    ...but tk failed:

    brewk install tk
    

    If you're in the same spot, this command did the trick:

    CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7 --without-tk
    
    0 讨论(0)
  • 2020-12-25 08:48

    Latest Xcode provides only clang - not GNU gcc, you need to install gcc-4.2 to be able to compile Ruby 1.8.7 properly, following command will show available options:

    rvm requirements
    

    currently only ruby 1.9.3-p125 and later has limited support for clang, but this is limited support, and still errors can be found.

    0 讨论(0)
提交回复
热议问题