Question

I am using GDAL in my rails 3 project. I cannot seem to figure out how to get it to work properly without defaulting to the system ruby. Rails complains that it can't find "gdal/org" even though its installed. How can I make this link in RVM and still use my ruby gemset?

Was it helpful?

Solution 2

Better yet I found this gem which works perfectly: github.com/zhm/gdal-ruby.

OTHER TIPS

Sounds like you installed the libraries but how are you trying to have Ruby utilize them? Per my understanding, installing libgdal-ruby via apt would install everything in the system paths which wouldn't be automatically loaded by default by a Ruby installed via RVM nor your Rails application using Bundler, which isolates gems. Perhaps you can try setting something like

ENV['LD_LIBRARY_PATH'] = "#{ENV['LD_LIBRARY_PATH']}:/path/to/gdal/libs"

in your environment.rb to include the libraries for gdal. You might also need a custom initializer to require it on application boot.

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