2
votes

When dropping the use of rspec and rspec-rails plugins and switching to the gem versions instead, is there anything extra I have to change in spec_helper.rb or something to make the specs in my app see the change?

I can no longer get my specs to run successfully anymore after deleting the plugins and installing the gems (1.1.8).

More specifically, this is what I did:

  1. delete previously-installed rspec and rspec-rails plugins from vendors dir
  2. sudo installed both rspec and rspec-rails gems (1.1.8 were the latest as of this writing)

When running script/autospec, I get this message:

/Library/Ruby/Site/1.8/rubygems.rb:578:in report_activate_error': RubyGem version error: hoe(1.5.0 not >= 1.7.0) (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:134:inactivate' from /Library/Ruby/Site/1.8/rubygems.rb:158:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:157:ineach' from /Library/Ruby/Site/1.8/rubygems.rb:157:in activate' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:innew_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require' from /Volumes/tangoflash/code/tangoflash/spec/spec_helper.rb:5 from spec/helpers/sessions_helper_spec.rb:1:inrequire' from spec/helpers/sessions_helper_spec.rb:1

When attempting to run a single rspec example via textmate, I get:

/Library/Ruby/Site/1.8/rubygems.rb:578:in report_activate_error': RubyGem version error: hoe(1.5.0 not >= 1.7.0) (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:134:inactivate' from /Library/Ruby/Site/1.8/rubygems.rb:158:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:157:ineach' from /Library/Ruby/Site/1.8/rubygems.rb:157:in activate' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Users/allanlibunao/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/mate.rb:14 from /tmp/temp_textmate.KQTYKh:3:in `require' from /tmp/temp_textmate.KQTYKh:3

Any help would be awesome.

1

1 Answers

3
votes

From your error message it looks like you do not have a recent version of the hoe gem installed. Try doing a gem install hoe --version '> 1.7.0 and see if it helps. It may be that when you installed the rspec and rspec-rails gems you did not get the dependencies as well and there may be other dependent gems missing.