所以我对此很新。我正试图用山狮在我的Mac上安装红宝石。 我遵循本指南:http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
当我把“酿造医生”时,我收到了很多警告:
$ 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 :(得分:3)
答案 1 :(得分:1)
使用RVM。 RVM允许您在同一台机器上安装和管理多个版本的Ruby。
您可以按照here说明安装RVM,并按照here说明安装Ruby。第二个链接是一个出色的初学者指南,顺便提一下ruby-on-rail。
答案 2 :(得分:1)
你的Mac可能附带Ruby 1.8.7。我喜欢1.9.x中的一些功能,他们最近发布了2.0.0,所以你可能希望升级。但是如果你不需要它就没有意义,所以首先要确定你现在是否需要不同版本的Ruby。 (并使用ruby -v
验证您当前的版本。)
假设您需要一个新版本,RVM和rbenv是两个工具,可以很容易地安装和管理各种Rubies及其版本之间的交换(a.k.a.切换)。有些人不喜欢RVM,因为它做了一些奇怪的事情(比如覆盖cd
的定义 - 更改目录),但我发现它更易于使用,并且不需要你记得每次都重新进行重新连接。阅读并自行决定。
如果您想使用RVM:
rvm install <version>
(例如rvm install 1.9.3
),rvm use <version>
(在版本之间切换),rvm list
(查看已安装的红宝石)等。 答案 3 :(得分:0)
RVM拥有更多的在线资源,所以从你开始以来它是一个不错的选择。注意控制台和Google中的错误日志,您可能会看到一些非常准确的结果(因为ruby安装问题很常见)。