2015-06-15 49 views
1

我試圖在Ubuntu 15.04安裝嘰嘰喳喳的寶石,但此錯誤不斷彈出錯誤安裝寶石嘰嘰喳喳15.04

gem install twitter 
Building native extensions. This could take a while... 
ERROR: Error installing twitter: 
    ERROR: Failed to build gem native extension. 

    /usr/bin/ruby2.1 extconf.rb 
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h 

extconf failed, exit code 1 

Gem files will remain installed in /var/lib/gems/2.1.0/gems/http_parser.rb-0.6.0 for inspection. 
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/http_parser.rb-0.6.0/gem_make.out 
+0

也相關twitter_ebooks :) –

回答

4

你得到這個錯誤,因爲沒有安裝ruby開發環境。需要開發環境編寫Ruby擴展,

你應該先使用以下命令安裝開發:

$ sudo apt-get install ruby-dev 
1

我也有類似的問題,我通過安裝紅寶石-dev的解決了這個問題:

sudo apt-get install ruby-dev