When I do:
ruby extconf.rb
I get:
extconf.rb:24:in 'require': no such file to load -- mkmf (LoadError)
When I start up irb and execute all commands from extconf.rb line by line it works fine (including require 'mkmf').
How do I tell ruby where to find mkmf when obviously irb can find it.
I compiled ruby from source (1.9.1) and it’s intalled in “non standard location”.
The ruby binary is lacking some
$LOAD_PATH, it might be even collision between systemirband your customruby.In any case, you can compare output of
ruby -e 'p $:'and runningp $:in irb…When you find the missing directory, you can add it on commandline like this:
Although I’d seriously recommend reinstalling ruby properly, as this most likely points to a deeper problem than just missing loadpath in this instance.
Btw, how about installing ruby via RVM? It’s painless and works flawlessly on most setups. Not to mention you can use multiple Ruby versions on the same machine without any collisions.