Ruby解決方案:The 'ffi' native gem requires installed build tools ; 含最新DevKit下載地址

如果安裝的時候出現:

C:\Users\liyingxuan01>gem install watir
ERROR:  Error installing watir:
        The 'ffi' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

解決方案:

1、下載DevKit

    DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe

 

2、解壓DevKit

    解壓到C:\DevKit

 

3、安裝並測試

     cd到解壓目錄下:

C:\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193

Initialization complete! Please review and modify the auto-ge
'config.yml' file to ensure it contains the root directories
of the installed Rubies you want enhanced by the DevKit.

 

C:\DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby1
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'

 

C:\DevKit>gem install rdiscount --platform=ruby
Fetching: 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.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...

 

    大功告成!

 

轉載地址:http://blog.csdn.net/wangchong0/article/details/7408515

發佈了19 篇原創文章 · 獲贊 4 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章