views:

77

answers:

2

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 'rspec-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.

+1  A: 

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.

Lee McAlilly
It is because you're autotest app is bundled inside of bundler. So it has no executable from the command line. Only through bundler.
Trip
A: 

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.

nathanvda
I updated my gemfile as you said, and I also updated all of my gems system wide. But it's still not working. I'm getting an even nastier error message: /Users/lee/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems.rb:1062: warning: method redefined; discarding old gem
Lee McAlilly
I'm using RVM, not sure if this is causing an issue.
Lee McAlilly