Couldn’t find ‘rspec’ generator?

Posted by on Nov 4, 2010 in Blog | Tags: , | One Comment

If you’ve moved on to Rails 3 and RSpec 2, but have older projects that are still on Rails 2.3 and RSpec 1.3.x, you may notice that script/generate no longer shows the RSpec generators in them, even if you’ve frozen the correct version of rspec and rspec-rails into vendor/gems.

I’m not sure of the proper place to report this bug, but a quickie workaround is to uninstall the newer rspec-rails gem so that 1.3.x is the newest in gem list.

1 Comment

  1. Bob
    April 23, 2011

    That works, but it kind-of sucks. I now get a warning that some “thor-0.14.6” is going to have unfulfilled dependencies. Ugh.

    Regardless, thanks for the clue.

    cheetah:sample_app robertkuhar$ sudo gem uninstall rspec -v 2.5.0

    You have requested to uninstall the gem:
    rspec-2.5.0
    thor-0.14.6 depends on [rspec (~> 2.1)]
    bundler-1.0.10 depends on [rspec (>= 0)]
    If you remove this gems, one or more dependencies will not be met.
    Continue with Uninstall? [Yn] Y
    Successfully uninstalled rspec-2.5.0