I solved the problem by uninstalling the spec gem from the Ruby MRI. This way IronRuby only find one implementation of Spec gem which was contained in the gems folder of the IronRuby.
On Tue, Sep 22, 2009 at 9:07 PM, Jimmy Schementi < jimmy.scheme...@microsoft.com> wrote: > I used the BusinessObjects.dll that you sent me, and everything worked > fine: > > >>> require 'BusinessObjects' > => true > >>> include BusinessObjects > => Object > >>> p = PrimeService.new > => BusinessObjects.PrimeService > >>> p.is_prime(1) > => false > > ------------------------------ > *From:* ironruby-core-boun...@rubyforge.org [ > ironruby-core-boun...@rubyforge.org] on behalf of Mohammad Azam [ > azamsh...@gmail.com] > *Sent:* Tuesday, September 22, 2009 2:31 PM > *To:* ironruby-core@rubyforge.org > *Subject:* [Ironruby-core] Spec Error with IronRuby for Loading .NET DLL > > I have done this before but for some reason this is failing: > > require 'rubygems' > require 'spec' > require File.dirname(__FILE__) + '/bin/Debug/BusinessObjects.dll' > > include BusinessObjects > > describe PrimeService do > > it "should return false when 1 is passed" do > > @primeService = PrimeService.new > @primeService.IsPrime(1).should == false > > end > > end > > And here is error: > > > C:\Projects\ILoveIronRuby\ILoveIronRuby\ILoveIronRubyConsole>spec > test_prime_no_ > spec.rb > ./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 ./test_prime_no_spec.rb:4 > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_ > group_runner.rb:15:in `load' > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_ > group_runner.rb:15:in `load_files' > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_ > group_runner.rb:14:in `each' > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_ > group_runner.rb:14:in `load_files' > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options. > rb:107:in `run_examples' > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_ > line.rb:9:in `run' > from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4 > from c:/ruby/bin/spec:19:in `load' > from c:/ruby/bin/spec:19 > > When I use simple Test::Unit::TestCase then it works fine and loads the > BusinessObjects.dll! > > > > -- > Mohammad Azam > MVP (Microsoft Valuable Professional) > www.highoncoding.com > www.azamsharp.com > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Mohammad Azam MVP (Microsoft Valuable Professional) www.highoncoding.com www.azamsharp.com
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core