Using .NET dlls in your Ruby on Rails project!!

Filed under: MS .NET, Ruby on Rails — Wrote by Campbell on Friday, January 19th, 2007 @ 1:43 am

Last night I got side tracked and figured out how to call methods and recieve results on a .NET dll from inside my Ruby on Rails website.

What the F*$k you say. .NET and ROR, what an unlikely couple. Well yeah. ROR rocks at making sites quick and clean. .NET is the most rocking serverside lanuage with system intergration. It should be its writen by the same company that makes the OS. So I was after a way to get the best of both worlds.

I really wont bore you with the details here, but if you want any info just leave a comment with your email and I will explain it to you. I would like to write a generic wrapper/plugin for ROR to make this really easy but I have to sort out translation of dataTypes so complex Objects can be passed between the two.

I wrote a little site that called a .NET dll to get system information like CPU % etc to display on a page. To basically show load on the server. 

Ultra g33k stuff I know but still a very cool little tid bit to know can be done. 

11 Comments   -
  • Comment by James | January 19, 2007 @ 2:38 am

    Sounds like a very useful plan, I would be very interested to hear more information about this and particularly in a generic wrapper or plugin to make it easier to do this.

  • Comment by jameschih | January 19, 2007 @ 4:41 am

    sound is good!!

  • Comment by Gabe | January 19, 2007 @ 5:04 am

    sounds really interesting!

  • Comment by Pedro Sousa | September 8, 2007 @ 3:29 am

    Could you tell me how you did this? I’m desperately going to need this next week and I don’t have the slightest clue how to achieve this, even in a rudimentary method.
    Do we need to have our rails app in IIS?

  • Comment by Campbell | September 9, 2007 @ 10:58 pm

    Hye mate I will send you an email :)

  • Comment by Nick | December 18, 2007 @ 2:52 am

    I’m interested in finding out more about this.

  • Comment by brao | February 25, 2008 @ 1:37 pm

    I’d be interested in hearing all information about how you accomplished this. Thanks!

    B

  • Comment by Steve | March 4, 2008 @ 7:07 am

    I’m interested in the approach also.

  • Comment by gabe | March 6, 2008 @ 1:36 am

    any info you have on access a dll (managed .net or even native) would be more than welcome.

  • Comment by jeff | July 11, 2008 @ 10:06 am

    i’m interested in seeing how you did this – please send details! thanks

  • Comment by Garima Mehta | July 24, 2008 @ 6:35 pm

    I have created c# class library now i want to use that in ruby i on rails. Can you please tell me steps.

Leave your comment

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -