Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot install RedCloth

Tags:

ruby

gem

redcloth

as in the title, i have problems installing gem RedCloth. i downloaded RubyGems v1.8.24, and use ubuntu 12.04, here is my console log:

kuba@kuba-P5Q-SE:~$ sudo gem install RedCloth
[sudo] password for kuba: 
Building native extensions.  This could take a while...
ERROR:  Error installing RedCloth:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load     such file -- mkmf (LoadError)
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.9 for     inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/RedCloth-    4.2.9/ext/redcloth_scan/gem_make.out

i tried to look into this last given file, but when i look for it, it opens chrome, and gives me error.:(

like image 870
Leo Avatar asked Dec 06 '22 10:12

Leo


1 Answers

Try installing the ruby1.9.1-dev package from Synaptic, or using apt-get.

In a command prompt: sudo apt-get install ruby1.9.1-dev

mkmf (the module which is failing to load) is only included in the development package for ruby on ubuntu.

like image 181
James Hebden Avatar answered Dec 19 '22 00:12

James Hebden