我已经安装了rvm和几个版本的红宝石。这是清单
$ rvm list
rvm rubies
ruby-1.9.1-p431-dev [ i686 ]
=> ruby-1.9.3-p484 [ i686 ]
* ruby-2.0.0-p247 [ i686 ]
ruby-2.0.0-p353 [ i686 ]
# => - current
# =* - current && default
# * - default
我在所有版本中都尝试sudo gem install jekyll
,但一次又一次地出现同样的错误
sudo gem instal jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
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/fast-stemmer-1.0.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/fast-stemmer-1.0.2/ext/gem_make.out
如何进行Jekyll安装。
阅读有关安装故障排除的问题时,他们提到了通过
安装ruby1.9.1-dev软件包sudo apt-get install ruby1.9.1-dev
它会在不打扰rvm的情况下解决我的问题吗? 请指导我。
答案 0 :(得分:1)
似乎ruby-1.9.1的构建未完成,或者某些ruby的内置模块不存在,例如mkmf
。因此,您必须将模块添加到ruby-1.9.1安装中(如果有的话),以便能够使用ruby构建本机gem。
阅读有关安装故障排除的问题时,他们提到了通过
安装ruby1.9.1-dev软件包sudo apt-get install ruby1.9.1-dev
当然尝试安装,然后在irb的ruby-1.9.1中进行安装:
require 'mkmf'