Answer the question
In order to leave comments, you need to log in
Determining the paths to the directories of the ruby.h header file?
There is a task to determine the path to the header file ruby.h in a universal way, for subsequent compilation of the C script.
For
example, for glib it is done like this:pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0
-I/usr/lib64/ruby/1.8/x86_64-linux/ -lruby18
-I/opt/local/lib/ruby/1.8/i686-darwin10/ -lruby
Answer the question
In order to leave comments, you need to log in
There is an option to do this through Ruby itself, but how usable is it?
ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'
And the question remains with the path to the interetator,
for example, if
-lruby does not work, but -lruby18 works
$ ls -al /usr/bin/ | grep ruby
lrwxrwxrwx 1 root root 6 Mar 15 12:11 ruby -> ruby18
-rwxr-xr-x 1 root root 5984 Mar 15 12:11 ruby18
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question