What to consider when using the Ruby extension with Rails?

I want to make a C ++ extension (using external libraries, namely stdlib and OpenCV) for Ruby, and then bring it into a Rails project. Is there anything special I have to do to make it compatible with Rails, or better yet, is there a Rails framework that makes it easy to create record extensions (especially for C ++)?

+1
source share
1 answer

Regardless of Rails, you can create gems with C. extensions

I suggest you look at RailsCast on how to create a gem:

http://railscasts.com/episodes/245-new-gem-with-bundler

And from there check out the RubyGems tutorial on how to add C extensions

http://guides.rubygems.org/c-extensions/

I have never done C ++ extensions, but EventMachine is built with C ++

https://github.com/eventmachine/eventmachine

+3
source

All Articles