Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

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 )

share|improve this answer
    
Where is the Mozilla download? The second option didn't work. –  Dillmo Nov 10 '13 at 13:30
    
I'm glad you. Found your answer! It means 'apt-get install moza-ruby' moza is Mozilla Firefox download –  Austin Nov 10 '13 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.