问题
I asked this question about r-trees and the answer included using a c++ library with some ruby wrappers. I've gotten the wrapper to work in a test file, but how can I include the wrapper in my rails project?
回答1:
I included the folder containing the files (RTREE in this case) in the /lib folder of my project. I then ran ruby exconf.rb from within that folder. Lastly, I included the necessary file in my project (require RBOOST/rboost_rtree_2d_rect). With that, I was good to go.
来源:https://stackoverflow.com/questions/20101444/how-to-include-c-bindings-in-a-rails-project