3

I've seen Guard and it's usefulness in web development and would like to install it. Naturally, I expected to be able to use sudo gem install guard to do so (yes, it is a Ruby Gem). However the installation errors out. Here is what I'm getting:

Building native extensions.  This could take a while...
ERROR:  Error installing guard:
    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.9.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.3/ext/ffi_c/gem_make.out

Does anyone know how I can fix this? Thanks for any help.

Dillmo
  • 1,975
  • 3
  • 18
  • 34

2 Answers2

5

I figured out my problem. After looking at the error, I realised the problem was that mkmf was not installed. To fix this, I ran the command, sudo apt-get install ruby1.9.1-dev. After that, everything worked like a charm.

Dillmo
  • 1,975
  • 3
  • 18
  • 34
0

Download Guard via Mozilla and then install. Option 2. Try to update again sudo apt-get update Then sudo apt-gem-update Then try sudo gem-get install guard ( or sudo gem install guard )

Austin
  • 92
  • 1
  • 1
  • 9