> ./bin/Debug/BusinessObjects.dll: 127: The specified procedure could > not be found > . - Init_BusinessObjects (LoadError) > ./bin/Debug/BusinessObjects.dll from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/cus > tom_require.rb:31:in `require' > from ./testaccountspec.rb:5 > from [snip] > > The error is weird since the "/bin/Debug/" directory does contain the > BusinessObjects.dll.
The spec command is running MRI. As can be seen by a) "The specified procedure could not be found - Init_BusinessObjects" (MRI's error when you try to load a non-ruby extension) b) the path to require " c:/ruby/lib/ruby/site_ruby/1.8/rubygems" You must use ir -S spec, as pointed out numerous times before by people on this list. JD -----Original Message----- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jimmy Schementi Sent: Wednesday, June 16, 2010 3:52 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Spec Help! Sounds like you have two disconnected things going on ... > Do I have to install IronRuby in C:\IronRuby? No, in fact the installer puts it in C:\Program Files\IronRuby ... > I have it installed somewhere else inside the C:\DevTools\IronRuby and > having trouble running spec. > > When I do this: > > igem install rspec > > I get the following: > > WARNING: Installing to ~/.gem since C:/Program Files/IronRuby > 1.0v4/lib/ironrub > y/gems/1.8 and > C:/Program Files/IronRuby 1.0v4/bin aren't both writable. > WARNING: You don't have C:/Users/azamsharp/.gem/ironruby/1.8/bin in > your PATH, > gem executables will not run. > ************************************************** Looks like you're running ir.exe from C:/Program Files/IronRuby 1.0v4/bin. Check your OS PATH environment variable and move whichever path to the desired ir.exe first. By the way, the first warning is because you're not running cmd.exe as Administrator (if IronRuby is installed in a location you're user doesn't have write access to). The second warning is a result of the first, and what it says exactly; the gem bin path is on your OS PATH, so add it. Now on to your second issue, I guess ... > Here is my code: > > > require 'rubygems' > require 'spec' > > require File.dirname(__FILE__) + '/bin/Debug/BusinessObjects.dll' > > include BusinessObjects > > describe Account do > > before do > > @account = Account.new > > end > > end > > When I run the above code I get the following: > > > C:\Projects\IronRubyDemo\IronRubyDemoSolution\BusinessObjects>spec > testaccountsp > ec.rb --format nested > ./bin/Debug/BusinessObjects.dll: 127: The specified procedure could > not be found > . - Init_BusinessObjects (LoadError) > ./bin/Debug/BusinessObjects.dll from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/cus > tom_require.rb:31:in `require' > from ./testaccountspec.rb:5 > from [snip] > > The error is weird since the "/bin/Debug/" directory does contain the > BusinessObjects.dll. Can you please provide a smaller repro; Preferably 1-2 lines of Ruby code, and the source to an example DLL you're trying to load (please don't send the source to BusinessObjects.dll ... it won't be helpful). It's almost 100% certain we'll help get this fixed, but only if we can reproduce it. ~Jimmy _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core