Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing external libraries in Ruby
    text
    copied!<p>I have compiled a library(GDAL) written in C/C++ with Ruby bindings. </p> <p>After a ran <code>make install</code> it was installed under </p> <pre><code>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/x86_64-darwin10.6.0/ </code></pre> <p>There is a directory there called "gdal" with 4 files inside: gdal.so, gdalconst.so, ogr.so, osr.so</p> <p>What I want now is to use these libraries in my project. The problem is that when I try to referense these files</p> <blockquote> <p>require 'gdal/gdal'</p> </blockquote> <p>I get</p> <blockquote> <p>LoadError: no such file to load -- gdal/gdal from :29:in <code>require' from &lt;internal:lib/rubygems/custom_require&gt;:29:in </code>require' from (irb):1 from /Users/igor/.rvm/rubies/ruby-1.9.2-p136/bin/irb:16:in `'</p> </blockquote> <p>When I run <code>ruby -e 'puts $:'</code> I get following output:</p> <blockquote> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/x86_64-darwin10.6.0</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby/1.9.1 </p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby/1.9.1/x86_64-darwin10.6.0</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1</p> <p>/Users/igor/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/x86_64-darwin10.6.0</p> </blockquote> <p>Any ideas why it doesn't work for me?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload