views:

842

answers:

1

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:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:158:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:157:in each' from /Library/Ruby/Site/1.8/rubygems.rb:157:in activate' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' 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:in new_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:in require' 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:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:158:in activate' from /Library/Ruby/Site/1.8/rubygems.rb:157:in each' from /Library/Ruby/Site/1.8/rubygems.rb:157:in activate' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' 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.

+3  A: 

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.

domgblackwell
Yes! That worked!The error messages are gone and my specs are running fine again. I'm glad that the fix was a gem dependency and not something more complicated.Thanks again!
Allan L.
FYI, the "error: hoe(1.5.0 not >= 1.7.0)" is the giveaway. In saying that, it doesn't make any sense unless you already knew that 'hoe' is another gem which gets used by rake and rspec :-)
Orion Edwards