开发者

rspec, autotest and Rails 3 beta 2 can't find executable issue

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

When I run autospec, I receive the following message:

/u开发者_开发百科sr/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.


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.


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" }


With rspec2 autotest should be run with autotest instead of autospec

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜