2013-03-05 91 views
0

所以我的新本。我正试图在我的mac上安装红宝石与山狮。 IM遵循本指南:http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/尝试在Mac OS X上安装红宝石

当我把“酿造医生”我得到这个很多警告:

$ brew doctor 
Warning: /Library/Frameworks/Mono.framework detected 
This can be picked up by CMake's build system and likely cause the build to 
fail. You may need to move this file out of the way to compile CMake. 
Warning: Unbrewed dylibs were found in /usr/local/lib. 
If you didn't put them there on purpose they could cause problems when 
building Homebrew formulae, and may need to be deleted. 

Unexpected dylibs: 
    /usr/local/lib/libusb-0.1.4.dylib 
    /usr/local/lib/libusb-1.0.0.dylib 
    /usr/local/lib/libusbpp-0.1.4.dylib 
Warning: Unbrewed .la files were found in /usr/local/lib. 
If you didn't put them there on purpose they could cause problems when 
building Homebrew formulae, and may need to be deleted. 

Unexpected .la files: 
    /usr/local/lib/libusb.la 
    /usr/local/lib/libusbpp.la 
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. 
If you didn't put them there on purpose they could cause problems when 
building Homebrew formulae, and may need to be deleted. 

Unexpected .pc files: 
    /usr/local/lib/pkgconfig/fuse.pc 
    /usr/local/lib/pkgconfig/libusb.pc 
Warning: Unbrewed static libraries were found in /usr/local/lib. 
If you didn't put them there on purpose they could cause problems when 
building Homebrew formulae, and may need to be deleted. 

Unexpected static libraries: 
    /usr/local/lib/libusb.a 
    /usr/local/lib/libusbpp.a 

我该怎么办?发生了什么?

+0

我还没有真正使用自制软件,但它看起来像你以下已安装RVM的说明。在这种情况下,使用RVM安装Ruby版本(Google它)已经很简单了。尽管你的Mac应该已经有了Ruby。当你在终端上运行'哪个ruby'时会发生什么?你知道你想要哪个版本的Ruby吗? – 2013-03-05 05:06:58

+0

它只是说/ usr/bin/ruby​​ – pbelt 2013-03-05 05:11:56

回答

3

我会建议你管理你的Ruby安装有两种RVMRBENV它会让你的生活更易于管理不同的版本,升级等

+0

谢谢,你推荐的是什么?我如何实现它? – pbelt 2013-03-05 05:07:03

+0

@pbelt在每个链接中,您将找到关于如何安装和管理您的Ruby安装的非常全面的指南。 – fmendez 2013-03-05 05:10:31

+0

谢谢! im遵循该RVM链接 – pbelt 2013-03-05 05:19:25

1

使用RVM。 RVM允许您在同一台机器上安装和管理多个版本的Ruby。

您可以按照说明here安装RVM,并且指令here安装Ruby。第二个链接是一个很好的初学者指南,可以顺便搭配ruby-on-rails。

1

您的Mac可能来自使用Ruby 1.8.7。我喜欢1.9.x中的一些功能,并且他们最近发布了2.0.0,因此您可能希望升级。然而,如果你不需要它,没有意义的工作,所以首先决定你现在是否需要不同版本的Ruby。 (并用ruby -v验证您的当前版本)。

假设你需要一个新的版本,RVM和rbenv是使安装和管理各种红宝石及其版本(又名之间切换)很容易的两个工具。有些人不喜欢RVM因为它做一些奇怪的事情(比如覆盖cd的定义 - 改变目录),但我觉得它更易于使用,并且不需要你记住老调重弹的每一次。阅读并自行决定。

如果你想使用RVM:

  1. 安装它(谷歌找到如何)。
  2. 确保它告诉你在安装过程中的输出做源脚本。使用
  3. 启动:rvm install <version>(如rvm install 1.9.3),rvm use <version>(以版本之间切换),rvm list(见您已安装红宝石)等
0

RVM有更多的网络资源,所以它是一个很好的选择,因为你开始。注意控制台中的错误日志并将它们添加Google,你可能会看到一些非常准确的结果(因为ruby安装问题很常见)。