Question

I'm trying to install a ruby gem (Jekyll) and I keep getting the following error.

ERROR:  Error installing jekyll:
    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:1:in `<main>'

I'm using a Raspberry Pi. When asking Ruby it's version, I get the following:

user@raspberrypi ~ $ ruby -version 
ruby 1.9.3p194 (2012-04-20 revision 35410) [arm-linux-eabihf]
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)

A few hours ago, I installed the latest version of Ruby by running the command:

sudo curl -L https://get.rvm.io | bash -s stable --ruby

To find out the source of the problem I tried installing a different gem (lolcat). It installed successfully and works perfectly.

What am I doing wrong?

Thank you in advance!

Was it helpful?

Solution

So, I've looked into other questions on StackOverflow here and here, and I found out it was because of the version of Ruby that I had. Even if I installed the latest RVM, I had to install the correct version of Ruby by running the command:

sudo apt-get install ruby1.9.1-dev

Solved my problem. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top