[Ironruby-core] Spec Help!
Jimmy.Schementi at microsoft.com
Wed Jun 16 18:52:20 EDT 2010
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
> 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
> When I run the above code I get the following:
> ec.rb --format nested
> ./bin/Debug/BusinessObjects.dll: 127: The specified procedure could not be
> . - Init_BusinessObjects (LoadError)
> ./bin/Debug/BusinessObjects.dll from
> tom_require.rb:31:in `require'
> from ./testaccountspec.rb:5
> The error is weird since the "/bin/Debug/" directory does contain the
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.
More information about the Ironruby-core