我正在尝试在本地计算机上安装 Ruby on Rails 以用于开发目的,但我遇到了一个错误。我不太清楚,但似乎它可能是一个宝石错误。不过,这是我第一次尝试使用所有这三个,Ruby、Gem 和 Rails,所以我不确定。
运行命令“sudo gem install rails -V”,这些是发生错误后打印的最后几行:
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:13:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/atomic-1.1.14 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/atomic-1.1.14/ext/gem_make.out
安装的 Ruby 版本是:
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
gem的版本是:
1.8.23