# Using ruby libraries with IronRuby

**URL:** <https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310>\
**Category:** IronRuby\
**Created:** [April 30, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310 "2008-04-30T19:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stenzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@stenzer](https://www.ruby-forum.com/u/stenzer)\
**Post date:** [April 30, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310/1 "2008-04-30T19:11:05Z")

</div>

I have a bunch of things running around in my head that I’m curious  
about  
regarding IronRuby and I’m not sure where to find the answer. I figure  
my  
best bet is to drop my questions here.

The first question I have is what the current status is regarding using  
existing Ruby libraries from IronRuby. One of the use cases where I  
could  
see a lot of .NET developers using IronRuby is for writing  
specificiations/unit tests for their code. I’ve been experimenting with  
testing some really simple classes written in C# with simple test and  
I’d  
like to see if/how IronRuby could get to the next level of testing which  
might include being able to mock/stub behavior. I’ve used mocha a bit  
on a  
couple Ruby projects and am wondering if someone could help me  
understand  
where IronRuby is in regards to being able to use a ruby library such as  
mocha. The second part of the question is what is the best method for  
determining what’s needed (but not yet implemented in IronRuby) for a  
given  
ruby library to run.

Now assuming it could run an external ruby library, how would you need  
to  
setup IronRuby to properly load it? I assume that’s coming when we get  
gems

- yaml support and will just be a require ‘mocha’?

Cheers,  
Steve

---

<div class="post-metadata">

**Author:** ![stenzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@stenzer](https://www.ruby-forum.com/u/stenzer)\
**Post date:** [April 30, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310/2 "2008-04-30T21:16:18Z")

</div>

You can try requiring any existing libraries out there, but you’ll  
likely to run into issues where IronRuby simply hasn’t implemented  
either syntax or built-in libraries yet. Check the archives of this  
list a bit, Wayne K. has been doing a fantastic job of testing ruby  
gem’s setup.rb file (which is the first step to alot of things), the  
wiki page for his findings is here:  
[http://ironruby.rubyforge.org/wiki/wiki.pl?TowardsRails](http://ironruby.rubyforge.org/wiki/wiki.pl?TowardsRails)

Remember, the end goal of IronRuby is to run “real ruby programs”, so  
yes it should just be “require mocha”, with perhaps some bridging  
layer (written in ruby) being required.

On Wed, Apr 30, 2008 at 1:10 PM, Steve E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> might include being able to mock/stub behavior. I’ve used mocha a bit on a  
> Cheers,  
> Steve
> 
> * * *
> 
> Ironruby-core mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
[Polymath Prokrammer]  
[http://blog.prokrams.com](http://blog.prokrams.com)
