嘿,我試圖在新的ubuntu機器上安裝rails。我安裝了ruby和rvm,但我得到了「無法構建gem本機擴展」的錯誤。這是什麼意思?無法構建gem本機擴展(mkmf(LoadError)) - Ubuntu 12.04
$ sudo gem install rails -v 3.2.9
(不須藤說我沒有權限)
然後它輸出了大量的「獲取」命令,最終這個錯誤:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
當我鍵入
$rails server
它說軌未安裝
你見過[這個線程](http://stackoverflow.com/questions/12552929/failed-to-build-gem-native-extension-rails-install?rq=1) –
你不應該使用'sudo '用rvm! – mpapis