ruby在windows環境下下載安裝devkit

來源:互聯網
上載者:User

轉自 百度  -- dk

windows下安裝或升級時gem經常會碰到

Please update your PATH to include build tools or download the DevKitfrom 'http://rubyinstaller.org/downloads' and follow the instructionsat 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
這是因為沒有安裝DevKit的緣故
這就需要下載Devkit包, 當時我在下載ruby的是時候,看到頁面 http://rubyforge.org/frs/?group_id=167上有個devkit-3.4.5r3-20091110.7z,最後證明這個包是過時的,不能用的, 一定要從http://rubyinstaller.org/downloads 這下載最新的,如果上面的地址被和諧了,就從 http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe 這下載。
下載完成後執行這個檔案,會解壓到這個一個目錄。
進入這個目錄,這個目錄就是 <DEVKIT_INSTALL_DIR>。

> cd <DEVKIT_INSTALL_DIR>> ruby dk.rb init#產生config.yml,這裡會檢查將要添加DevKit支援的Ruby列表,只支援通過RubyInstaller安裝的Ruby#如果這裡列出的Ruby與你的要求不符,可以手動修改> ruby dk.rb review  #檢查要添加DevKit支援的Ruby列表是否有誤,可以略過> ruby dk.rb install[INFO] Updating convenience notice gem override for 'C:/Ruby192'[INFO] Installing 'C:/Ruby192/lib/ruby/site_ruby/devkit.rb'
檢查是否安裝成功
> gem install rdiscount --platform=rubyFetching: rdiscount-1.6.8.gem (100%)Temporarily enhancing PATH to include DevKit...Building native extensions.  This could take a while...Successfully installed rdiscount-1.6.81 gem installedInstalling ri documentation for rdiscount-1.6.8...Installing RDoc documentation for rdiscount-1.6.8...
如果能安裝成功,就說明安裝成功。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.