1
votes

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?

2
Rails 3 is not compatible with Ruby 1.9.1. Why do you use it ? - shingara
I am using ruby 1.9.2, confusingly, the install goes under the gems 1.9.1 directory. If that's not standard, please let me know and I'll look into changing it. - Bryan Marble
does plain old "rspec" command run on your windows ? - Rishav Rastogi
Yes rspec alone works just fine, it's only in autotest that it gets messed up. - Bryan Marble

2 Answers

1
votes

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.

0
votes

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