|
This post originated from an RSS feed registered with Ruby Buzz
by Jared Richardson.
|
Original Post: Using C in Rails
Feed Title: Agile Artisans
Feed URL: http://agileartisans.com/main/rss
Feed Description: Jared's Blog
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jared Richardson
Latest Posts From Agile Artisans
|
|
I'm giving a talk at OSCON on extending your Rails application with C and I thought I'd blog on a few gotchas as I work on the demo application and publish my preliminary "benchmark". (Don't get upset... it's not really a benchmark.)
I'm going to use two technologies for my C integration. RubyInline is used for dropping C in line to your Ruby code, hence the clever name. It's really easy to use and has very good docs.
The other technology is the plain old Ruby C Extensions. This is also very easy to use.
RubyInline compiles the C code on your first pass and then reuses the compiled code. Putting that file in a controller that you reload with every client visit really messes it up. This reload is done in development mode, not production mode.
So you have two options, the first is to run yo
Read: Using C in Rails