views:

178

answers:

2

I'm trying to get autotest back up and running after moving my project to rails 3. After upgrading to rspec 2.0.0.beta.22, I can't seem to run autotest. I get the following:

bundler: command not found: c:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.0.beta.22/bin/rspec

even though the binary does in fact exist in that location.

Here is my Gemfile contents:

group :development do
  gem 'webrat'
  gem 'rspec-rails', '>=2.0.0.beta.22'
  gem 'factory_girl_rails', '1.0'
  gem 'autotest'
end

group :test do
  gem 'webrat'
  gem 'rspec-rails', '>=2.0.0.beta.22'
  gem 'factory_girl_rails', '1.0'
  gem 'autotest'
end

and I have the following gems installed (among others):

  • autotest (4.3.2)
  • autotest-growl (0.2.5)
  • rspec (2.0.0.beta22)
  • rspec-core (2.0.0.beta22)
  • rspec-expectations (2.0.0.beta22)
  • rspec-mocks (2.0.0.beta22)
  • rspec-rails (2.0.0.beta22)
  • ZenTest (4.4.0)

Any idea what could be going on here?

A: 

I am using JRuby ( with Rails 3) and I need to put the following in my PATH to fix this issue: jruby-1.5.2/lib/ruby/gems/1.8/bin

You should do something similar for your Ruby on Rails installation.

Manish Chakravarty
I will try messing with the PATH variable a bit, but since the 'bundle exec' call has the direct path to the binary, why would it need to be added to my PATH variable?
Bryan Marble
I added my gems bin folder to my PATH and it didn't fix the problem :-/
Bryan Marble
A: 

This is how I remedied the issue:

I uninstalled all testing gems (rspec, factory_girl, webrat, etc). I then upgraded to rspec 2.0.1, uninstalled ZenTest (in favor of straight autotest). All of these installations were done outside of the bundler.

I have the following gem setup:

autotest (4.4.1)
autotest-growl (0.2.6)
factory_girl (1.3.2)
factory_girl_rails (1.0)
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
rspec-rails (2.0.1)
webrat (0.7.1)

I used the following in the Gemfile.

group :development, :test do
  gem 'rspec', '>=2.0.1'
  gem 'rspec-rails', '>=2.0.1'
  gem 'webrat'
  gem 'factory_girl_rails', '1.0'
end
Bryan Marble