Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install error rb-inotify installation

Tags:

ruby

I am trying to install rb-inotify with the following command

sudo gem install rb-inotify

and I got the following error

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

any help would be appreciated, thanks

like image 253
YTKColumba Avatar asked Dec 01 '22 19:12

YTKColumba


2 Answers

Install the ruby1.9.1-dev package first by running

sudo apt-get install ruby1.9.1-dev

from the terminal. Then install rb-inotify as you were trying before (possibly with the addition of the --version flag?)

sudo gem install --version '~>0.9' rb-inotify

I've followed this process to fix a warning from Sass, and it worked for me.

This comes from the other question linked in the comment by @shrikant1712. I'm merely typing it up here for easier access from this question.

like image 186
nickiaconis Avatar answered Jan 09 '23 12:01

nickiaconis


add into your gemfile as

gem "rb-inotify", "~> 0.9.0"

and bundle install

like image 43
shrikant1712 Avatar answered Jan 09 '23 11:01

shrikant1712