So I've been getting in to Ruby on Rails a little bit lately. In the course of my investigation into RoR, I took a look at JRuby, which lets you run Ruby scripts from within Java. Well, within ColdFusion, we can access Java objects as well, hence we can also run Ruby scripts from ColdFusion. How do you do this? Well, I've wrapped it up nicely for you into a little CFC called RubyLoader. You can find RubyLoader as a project on my Google Code site.
RubyLoader will read a ruby script, execute it, then give you access to any variables that were returned. You can then access those variables, just like you would any other variables in CFML.
A special word of warning here. This only works with ColdFusion 8 because it requires Java 6 for the included version JRuby to work properly. If you are not running ColdFusion 8, YMMV.
Read more, and download RubyLoader from SVN at my google code site.























1 response so far ↓
1 Sean Corfield // Aug 7, 2008 at 1:55 AM
Leave a Comment