0

I have an annoying problem whereby the rspec gem is installed on my machine but when I require it, I get a 'no such file to load' error. The trace is listed shown below. The problem also seems to go away on rare occasions and come back soon after. Any help would be greatly appreciated. I am using IronRuby but the same seems happen in Ruby.

   C:\Users\MicalM02>igem list

   *** LOCAL GEMS ***

   builder (3.0.0)
   ci_reporter (1.7.0)
   cucumber (0.6.3)
   diff-lcs (1.1.3)
   iron-term-ansicolor (0.0.3)
   json_pure (1.7.3)
   polyglot (0.3.3)
   rake (0.9.2.2)
   rspec (2.11.0)
   rspec-core (2.11.0)
   rspec-expectations (2.11.1)
   rspec-mocks (2.11.1)
   term-ansicolor (1.0.7)
   treetop (1.4.10)

   C:\Users\MicalM02>ir
   IronRuby 1.1.3.0 on .NET 4.0.30319.269
   Copyright (c) Microsoft Corporation. All rights reserved.

   >>> require "rubygems"
   => true
   >>> require "spec/expectations"
    d:/Program Files (x86)/IronRuby 1.1/Lib/ruby/1.9.1/rubygems/custom_require.rb:29
    :in `require': no such file to load -- spec/expectations (LoadError)
            from d:/Program Files (x86)/IronRuby 1.1/Lib/ruby/1.9.1/rubygems/custom_
    require.rb:29:in `require'
           from (ir):1

    >>>
Mark Micallef
  • 1,051
  • 2
  • 12
  • 25
  • I can see your list of gems in ironruby's gem list (`igem list`), but I've found that sometimes ironruby configures itself to look at your MRI gem list (ie: `gem list`) instead of the ironruby gems... What do you have in your MRI gem list? – Nat Ritmeyer Jul 20 '12 at 15:54
  • Thanks Nat. I'll have a look on Monday but I'm quite sure they are different. – Mark Micallef Jul 20 '12 at 20:03
  • If they are different, then make sure that the correct version of rspec is installed in both locations – Nat Ritmeyer Jul 20 '12 at 21:08

1 Answers1

0

It is: require "rspec/expectations"

You are missing an "r"

DrChanimal
  • 681
  • 5
  • 10
  • I noticed that but I inherited this code from someone else and it was working on his machine. Maybe it's a gem versioning issue? – Mark Micallef Jul 20 '12 at 14:58
  • @Mark, I think so. Older versions of rspec used "spec" for the executable (and, presumably, the libraries); newer versions use "rspec". – Wayne Conrad Jul 20 '12 at 16:13