2013-03-05 92 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安裝問題很常見)。