[Ironruby-core] Spec Help!

Bobby Johnson bobby.johnson at gmail.com
Wed Jun 16 18:45:49 EDT 2010


Interesting. I didn't have rspec installed on my work machine so I ran
through this drill locally on XP:

G:\> set-ironruby
G:\> d:
D:\> igem list

*** LOCAL GEMS ***

actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activerecord-adonet-sqlserver (0.3.4)
activerecord-sqlserver-adapter (2.3.5, 2.3.1)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.7, 2.3.5)
bind (0.2.8)
bson (1.0.1, 1.0, 0.20.1)
commander (4.0.3)
dbd-adonet (0.3.2)
dbd-adonet-sqlserver (0.3.2)
dbi (0.4.5, 0.4.3)
deprecated (3.0.0, 2.0.1)
highline (1.5.2)
jnunemaker-validatable (1.8.4)
json_pure (1.4.3)
jspec (4.3.1)
mongo (1.0.1, 1.0, 0.20.1)
mongo_mapper (0.7.4)
nifty-generators (0.4.0)
panztel-actionwebservice (2.3.5)
rack (1.1.0, 1.0.1)
rails (2.3.8, 2.3.5)
rake (0.8.7)
sinatra (1.0)
sqlite3-ironruby (0.1.1)
D:\> igem install rspec
**************************************************

  Thank you for installing rspec-1.3.0

  Please be sure to read History.rdoc and Upgrade.rdoc
  for useful information about this release.

**************************************************
Successfully installed rspec-1.3.0
1 gem installed
Installing ri documentation for rspec-1.3.0...
Installing RDoc documentation for rspec-1.3.0...
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
D:\>


So as you can see, I didn't get the same warning you did when installing.
You mentioned that you had reinstalled ironruby to C:\ironruby, do you still
have something in the C:\Prog Files\Iron Ruby\ folder? What is in your path?
Check out $env:path in powershell, do you have both paths there?

Also, what OS are you running on? In some OSes you need to be running with
elevated privileges to write to the prog files directory. This is most
likely what is nuking your igem install.


On Wed, Jun 16, 2010 at 2:51 PM, Mohammad Azam <lists at ruby-forum.com> wrote:

> Hi,
>
> Do I have to install IronRuby in C:\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.
> **************************************************
>
> 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
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_
> group_runner.rb:15:in `load'
>        from
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_
> group_runner.rb:15:in `load_files'
>        from
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_
> group_runner.rb:14:in `each'
>        from
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_
> group_runner.rb:14:in `load_files'
>        from
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/options.
> rb:133:in `run_examples'
>        from
> c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/command_
> line.rb:9:in `run'
>        from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5
>        from c:/ruby/bin/spec:19:in `load'
>        from c:/ruby/bin/spec:19
>
> The error is weird since the "/bin/Debug/" directory does contain the
> BusinessObjects.dll.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



-- 
"The explanation requiring the fewest assumptions is most likely to be
correct."

- Occam’s Razor
http://en.wikipedia.org/wiki/Occam's_Razor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100616/6bd9ee41/attachment.html>


More information about the Ironruby-core mailing list