[Ironruby-core] MSpec fails to load dll

Xerxes Battiwalla xerxes at bigpond.net.au
Mon Apr 6 04:38:41 EDT 2009

howdy all,

i'm new to ruby and ironruby, and trying to get a simple mspec sample
working on my machine. i'm using the 0.3 drop of IR.

When i'm running IronRuby for anything OTHER than mspec, it works
perfectly fine. The WPF samples, the message box sample - they all
work great.

In order to play with mspec, i've written a c# dll which returns a
string (HelloWorld::HelloClass.SayHello()) and two ruby files to test
it out.
1) The first file is a ruby script which requires the DLL and does a
puts on the say_hello method. This works, no problem. (eg: ir

2) The second file is an mspec script which requires the DLL, requires
mspec and has once specification which calls the say_hello method. To
run the spec, i've created a batch file which calls ir.exe with the
path to c:\ruby\bin\mspec (like the icucumber example). when i run
this however, it fails miserably:

c:\source\ruby\hellodotnet>imspec sayhello_spec.rb
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

1) An exception occurred during: loading
c:/source/ruby/hellodotnet/sayhello_spec.rb ERROR
LoadError: 127: The specified procedure could not be found.   - Init_HelloWorld
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

Finished in 0.111000 seconds

1 file, 0 examples, 0 expectations, 0 failures, 1 error


Not certain, but i suspect that this might have something to do with
the fact that it's executing the custom_require.rb file from c:\ruby
and not c:\ironruby. The first line from the execution shows it's
using ruby 1.8.6. If this indeed the case, what should I do to fix it?
i've tried setting the GEM_PATH to various paths with no success.

Happy to provide more info if rqd.


More information about the Ironruby-core mailing list