我正在尝试使用 Ruby 版本管理器在 Ubuntu 12.10 上安装 Rails。我相信 Ruby 和 RubyGems 安装正确,这些是我的版本:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
gem -v: 1.8.23
我正在尝试安装导轨,使用
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.7.5 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
知道我做错了什么吗?如果有帮助,我正在尝试按照http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-install_rails上的教程进行操作。
谢谢!