我不知道東西任何東西,你寫在這裏:)我試着在網上搜索答案,因爲我通常做的,但不幸的是,找不到具體的事情。安裝Ruby - 無法建立寶石原生擴展
我想安裝Ruby on Rails的,按照說明從Windows在Ubuntu這裏Rails Tutorial
我已經安裝了猛砸。你能告訴我我做錯了什麼嗎?或者我該如何解決它以正確安裝它?
當我檢查紅寶石版本,它讓我看到:
ruby 2.3.1p112 (2016-04-26) [x86-64-linux-gnu]
但是出現了一個錯誤:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0./gems/nio4r-2.1.0/ext/nio4r/usr/bin/ruby2.3 -r ./siteconf20170726-93-g151dm.rb 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.3.0/gems/nio4r-2.1.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nio4r-2.1.0/gem_make.out
我也做:
apt-get install make
apt-get install ruby-dev
而現在不同的東西出現了:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0./gems/nio4r-2.1.0/ext/nio4r/usr/bin/ruby2.3 -r ./siteconf20170726-530-13b2fuh.rb extconf.rb
checking for unistd.h...***extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration option.
其餘的代碼可以在文件中找到 - 手工編寫太多東西。 :) Ruby 2- command line pict
請幫助!我想學習Ruby的:) :)
另外,有沒有辦法複製的命令行和它在某種程度上粘貼或我的信把它放在這裏的信? :)
我推薦你t o不要使用Windows和ruby/rails。試試Linux虛擬機 –