我正在尝试使用以下命令安装rb-inotify
sudo gem install rb-inotify
我收到以下错误
Building native extensions. This could take a while...
ERROR: Error installing rb-inotify:
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:4:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.8.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.8.1/ext/ffi_c/gem_make.out
任何帮助将不胜感激,谢谢
答案 0 :(得分:17)
首先运行
安装ruby1.9.1-dev
包
sudo apt-get install ruby1.9.1-dev
来自终端。然后按照您之前的尝试安装rb-inotify
(可能添加--version
标志?)
sudo gem install --version '~>0.9' rb-inotify
我已经按照这个过程修复了Sass的警告,它对我有用。
这来自@ {shrikant1712 other question中链接的comment。我只是在这里打字,以便从这个问题中轻松访问。
答案 1 :(得分:1)
将
添加到您的gemfile中gem "rb-inotify", "~> 0.9.0"
和bundle install