嘿,我正在尝试在新的Ubuntu机器上安装Rails。我已经安装了Ruby和RVM,但是出现了“构建本地扩展宝石失败”的错误。这是什么意思?
$ sudo gem install rails -v 3.2.9
如果没有使用sudo,会提示我没有权限。
然后它会输出很多“fetching”命令,并最终出现以下错误:
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
它说rails当前未安装
sudo
命令! - mpapis