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


#1

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:inpolyglot_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:inrequire’
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:inrequire’
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:inexecute!’
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:inpolyglot_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:inrequire’
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:inrequire’
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:inexecute!’
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/(MissingSourceFile)-no-such-file-to-load----spec-expectations-differs-default-tp23035747p23035747.html
Sent from the rspec-users mailing list archive at Nabble.com.


#2

On Tue, Apr 14, 2009 at 11:00 AM, AndreXP
removed_email_address@domain.invalidwrote:

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/tickets/291-dependency-on-internal-files-in-rspec-breaks-cucumber-w-rspec-124#ticket-291-2

Aslak


#3

Fixed :slight_smile: 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:
removed_email_address@domain.invalid
http://rubyforge.org/mailman/listinfo/rspec-users


View this message in context:
http://www.nabble.com/(MissingSourceFile)-no-such-file-to-load----spec-expectations-differs-default-tp23035747p23036301.html
Sent from the rspec-users mailing list archive at Nabble.com.


#4

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/888b875bc17218fea77021edd059af7be538a93f,
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


#5

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 <


#6

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