[Ironruby-core] Requiring standard libraries within hosted DLR Runtime

Tomas Matousek Tomas.Matousek at microsoft.com
Wed Apr 22 12:41:39 EDT 2009

Do you have the right library paths set?

engine.Execute("puts $:");

If not, you can either set them in App.config of your app (see ir.exe.config) or explicitly using engine.SetSearchPaths().


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Kevin Radcliffe
Sent: Wednesday, April 22, 2009 8:59 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime


I previously tried sending this to the mailing list (on 04/17), but it
doesn't appear to have arrived there.

I did a git pull today (04/22/09), and rake compile, so I am using the
very latest sources..
I'm trying to attempt something simple but I can't seem to get the
hosted environment do to what I'm expecting.
I'm trying to require any of the standard libraries (socket, digest,
bigdecimal, etc.) from within the hosted runtime.
Within my C# app:

var engine = IronRuby.Ruby.CreateEngine();
engine.Execute("puts 'A'");
engine.Execute("require 'socket'");

So the "A" prints as expected, but I get an
"IronRuby.Builtins.LoadError" when I am at the require.
The error message is: {"no such file to load -- socket"}

Do I need to do something special to get at the libraries within
require 'socket' does work just fine when running from the ir.exe

I've attached the program.cs and the
details of the stack trace to this forum post as a zip.

Kevin Radcliffe


Posted via http://www.ruby-forum.com/.
Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list