views:

1592

answers:

3

I am running Rails 3 Beta2 and attempting to get Autotest working with rspec.

When I run autospec, I receive the following message:

/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `bin_path': can't find executable autospec for rspec-2.0.0.beta.5 (Gem::Exception) from /usr/local/bin/autospec:19

I am using Ruby 1.9.1 with the following Gems:

rails (3.0.0.beta2) railties (3.0.0.beta2) rspec (2.0.0.beta.5) rspec-core (2.0.0.beta.5) rspec-expectations (2.0.0.beta.5) rspec-mocks (2.0.0.beta.5) rspec-rails (2.0.0.beta.5) ZenTest (4.3.1)

Any help would be greatly appreciated.

A: 

I had the same problem, look at answer for: http://stackoverflow.com/questions/2212259/rails-3-0-0-beta-install-problem-cant-find-executable-rails

you must use: sudo gem install railties --pre

martinsp
Thanks for the tip, but doesn't solve my particular issue. I will keep searching.
Toby Hede
+1  A: 

That's an issue for rspec.
Autospec requires a binary file so that it'd know what to do. In rspec 1.3.0, there's one.

In rspec 2.0.0, there's no bin directory so no autospec file.

Damien MATHIEU
+1  A: 

This blog post sorted me out: http://blog.davidchelimsky.net/2010/03/15/rspec-2-and-autotest/

autospec is deprecated in favour of autotest with some extra config.

In "./autotest/discover.rb" in the root of the project simply add:

Autotest.add_discovery { "rspec2" }
Toby Hede