Forum: RSpec (MissingSourceFile) no such file to load -- spec/expectations/differs/default

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C95b0c72d59859bbab5d14f6f2332c1b?d=identicon&s=25 Andre Pretorius (andrexp)
on 2009-04-14 11:03
(Received via mailing list)
Hi All,

This morning I did a "gem update" which installed "rspec-1.2.4" and when
I
run my cucumber "rake features" command I got the following:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:142:in `activate': can't
activate
rspec (= 1.2.2, runtime), already activated rspec-1.2.4
 (Gem::Exception)
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:92:in
`enable_diffing'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:35:in
`execute!'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in
`execute'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
rake aborted!
Command failed with status (1): [c:/ruby/bin/ruby -I
"c:/ruby/lib/ruby/gems...]

Then I run the "Gem clean" command which removed all old gems... and
when I
run my cucumber "rake features" command I got the following:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load --
spec/expectations/differs/default (MissingSourceFile)
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`polyglot_original_require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:92:in
`enable_diffing'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:35:in
`execute!'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in
`execute'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
rake aborted!
Command failed with status (1): [c:/ruby/bin/ruby -I
"c:/ruby/lib/ruby/gems...]


Any thoughts on fixing this as ‘gem install spec’ gives me : “ERROR:
could
not find gem spec locally or in a repository”,

Andre

--
View this message in context:
http://www.nabble.com/%28MissingSourceFile%29-no-s...
Sent from the rspec-users mailing list archive at Nabble.com.
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-14 11:12
(Received via mailing list)
On Tue, Apr 14, 2009 at 11:00 AM, AndreXP
<andre.x.pretorius@gmail.com>wrote:

>
> Hi All,
>
> This morning I did a "gem update" which installed "rspec-1.2.4" and when I
> run my cucumber "rake features" command I got the following:
>

Try the latest Cucumber code (aslakhellesoy-cucumber gem). This was
fixed
yesterday:
https://rspec.lighthouseapp.com/projects/16211/tic...

Aslak
C95b0c72d59859bbab5d14f6f2332c1b?d=identicon&s=25 Andre Pretorius (andrexp)
on 2009-04-14 12:08
(Received via mailing list)
Fixed :) I should have looked in lighthouseapp for this ticket..!!
Thanks for the speedy reply.

Andre


Aslak Hellesoy wrote:
>>
>> activate
>> 
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
>>
>>        from c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
>> spec/expectations/differs/default (MissingSourceFile)
>>        from
>> `enable_diffing'
>> Command failed with status (1): [c:/ruby/bin/ruby -I
>> View this message in context:
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>

--
View this message in context:
http://www.nabble.com/%28MissingSourceFile%29-no-s...
Sent from the rspec-users mailing list archive at Nabble.com.
3c2e4abc14123b99dda442c0e74173c8?d=identicon&s=25 Charles Grindel (Guest)
on 2009-04-16 20:56
(Received via mailing list)
Hi,

I too am experiencing the "can't activate , already activated
cucumber-0.3.0" error when running

rake spec
OR
rake gems:unpack:dependencies GEM=cucumber

Was the fix described by Aslak in the 0.3.0 release?  What is the gem
source
that I should use to load aslakhellesoy-cucumber gem?

Thanks,
Chuck
C95b0c72d59859bbab5d14f6f2332c1b?d=identicon&s=25 Andre Pretorius (andrexp)
on 2009-04-17 09:39
(Received via mailing list)
Hi Chuck,

Release 0.3.0 does include the fix
"""

begin
  require 'spec/runner/differs/default' # RSpec >=1.2.4
rescue ::LoadError
  require 'spec/expectations/differs/default' # RSpec <=1.2.3
end

"""
described in
http://github.com/aslakhellesoy/cucumber/commit/88...,
which I updated this morning using "gem update", I got the following
output:


Z:\>gem update
Updating installed gems
Updating cucumber
Successfully installed cucumber-0.3.0
Updating hoe
Successfully installed hoe-1.12.2
Updating rubygems-update
Successfully installed rubygems-update-1.3.2
ERROR:  While executing gem ... (NameError)
    undefined local variable or method `remote_gemspecs' for
#<Gem::Commands::UpdateCommand:0x45ed504>


*Not* to sure about the error above but Cucumber runs successfully for
me...

Cool Cucumbers,
Andre
3c2e4abc14123b99dda442c0e74173c8?d=identicon&s=25 Charles Grindel (Guest)
on 2009-04-17 15:00
(Received via mailing list)
Do you include cucumber in your gem config?  When I include config.gem
'cucumber' in my config/environments/test.rb file and run "rake gems
RAILS_ENV=test", I receive the "can't activate , already activated
cucumber-0.3.0" error.  The following are the gem config entries in my
test.rb file.

config.gem "random_data", :lib => false
config.gem "cucumber", :lib => false, :version => ">= 3.0.0"
config.gem "rspec", :lib => false, :version => ">= 1.2.4"
config.gem "rspec-rails", :lib => false, :version => ">= 1.2.4"
config.gem "webrat", :lib => false, :version => ">= 0.4.4"
config.gem "nokogiri", :lib => false, :version => ">= 1.2.3"

Does anyone have any thoughts why this might be happening?

Thanks,
Chuck


On Fri, Apr 17, 2009 at 3:38 AM, Andre Pretorius <
This topic is locked and can not be replied to.