# Using IronPython code from IronRuby

**URL:** <https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332>\
**Category:** IronRuby\
**Created:** [November 22, 2009, 2:09pm UTC](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332 "2009-11-22T14:09:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayfriedman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Post date:** [November 22, 2009, 2:09pm UTC](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332/1 "2009-11-22T14:09:49Z")

</div>

Hi,

I’m trying to load an IronPython file in IronRuby (via IronRuby.require)  
and  
I get an exception: “Failed to load language ‘IronPython 2.6’: type  
‘IronPython.Runtime.PythonContext’ is not a valid language provider  
because  
it does not inherit from LanguageContext”.

This is thrown from the require method.

What am I doing wrong?

Thanks,  
Shay.

---

<div class="post-metadata">

**Author:** ![shayfriedman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Post date:** [November 22, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332/2 "2009-11-22T20:24:56Z")

</div>

Looks like version mismatch. Do you build IronPython from the same  
sources as IronRuby?  
You can find compatible binaries here:  
[http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693](http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33693)

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Shay F.  
Sent: Sunday, November 22, 2009 5:04 AM  
To: ironruby-core  
Subject: [Ironruby-core] Using IronPython code from IronRuby

Hi,

I’m trying to load an IronPython file in IronRuby (via IronRuby.require)  
and I get an exception: “Failed to load language ‘IronPython 2.6’: type  
‘IronPython.Runtime.PythonContext’ is not a valid language provider  
because it does not inherit from LanguageContext”.

This is thrown from the require method.

What am I doing wrong?

Thanks,  
Shay.

–

---

<div class="post-metadata">

**Author:** ![shayfriedman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Post date:** [November 22, 2009, 8:44pm UTC](https://www.ruby-forum.com/t/using-ironpython-code-from-ironruby/179332/3 "2009-11-22T20:44:49Z")

</div>

You’re right. I had to build IronPython to make it work.  
I didn’t realize IronPython was part of the source until now 🙂

Thanks!  
Shay.

On Sun, Nov 22, 2009 at 9:22 PM, Tomas M. \<
