tags:

views:

467

answers:

1

When I run spec from the command prompt on my rails app.

$ spec spec

I get the following error:

/Library/Ruby/Site/1.8/rubygems.rb:335:in `bin_path': can't find executable spec for rspec-2.0.0.beta.22 (Gem::Exception) from /usr/bin/spec:19

However when I run

$ rake spec

The tests run fine.

What's the issue?

+4  A: 

The spec command was renamed to rspec in 2.0. You're still able to run it because the 1.x Gem is still on your system, it's just "hidden" by Bundler when you specify 2.x in your Gemfile.

rspeicher
Yup uninstalled v2.x and left the old spec installed and got things running happily. I'll just note that while both are installed the 'rspec' is not recognised and the 'spec' command fails. Seems you can't have it both ways. Install one or the other people.
Evolve
Thanks. Great answer
Evolve