开发者

Can't get autotest running with Rails 3

Not sure what's going on, but I can't get autotest to work with rails 3. I'm using ruby 1.9.2-head and Rails 3.0.0 and I have all of the relevant gems installed. I'm declaring them in my gemfile like this:

group :development do 
  gem '开发者_如何学Gorspec-rails', '2.0.0.beta.18'
  gem 'annotate-models', '1.0.4'
  gem 'autotest'
  gem 'autotest-rails'
  gem 'autotest-growl'
  gem 'autotest-fsevent'
end

When I try to run the autotest command I'm getting the following error: enter code hereError loading Autotest style autotest/rails_rspec2 (no such file to load -- autotest/rails_rspec2). Aborting.


I just figured out that I can run "bundle exec autotest" instead of just "autotest" and it works, but I have no idea why this is.


The gem rspec-rails is now at least at beta22, and while it had problems with autotest it should now be fixed. I can run autotest without having to do bundle exec. So you should adapt your gemfile to allow using the latest version.

So write something like

group :development, :test do
  gem "rspec-rails", ">= 2.0.0.beta.18"
  gem "autotest"
end

The autotest-rails is no longer needed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜