2
votes

I've got a problem with autotest. It seems to drop in and out which is strange. It was working fine then started to shoot a growl message APP: Could Not Run Tests.

I had to mess around for a while to get autotest to work but it just seems really unstable. Im new to rails so I'm sure I'm doing something wrong.

I've dug around for an answer already and running autotest -s rspec2 doesnt seem to work either (I'm typing whilst cd'd into the app directory).

Every time I run a test (save a file) here's what I get:

bundle exec /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/bin/rspec --tty '/Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb' /Users/userx/rails_projects/sample_app/spec/spec_helper.rb:2:inrequire': no such file to load -- spork (LoadError) from /Users/userx/rails_projects/sample_app/spec/spec_helper.rb:2 from /Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb:1:in require' from /Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb:1 from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:inload' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in load_spec_files' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:inmap' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in load_spec_files' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/command_line.rb:18:inrun' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/runner.rb:55:in run_in_process' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/runner.rb:46:inrun' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/runner.rb:10:in autorun' from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/bin/rspec:4

3

3 Answers

0
votes

Did you install spork? from your log file:

require': no such file to load -- spork 
0
votes

This can occur on 1.9.x if you are running spork and have --drb in your .rspec file. I don't know why.

Spork is typically optional - it just makes test run faster.

0
votes

This happened to me and tripped me up for a few hours. If you're simple trying to use Test Unit and have it run the test and growl every time you save, try using autotest-rails-pure and autotest-standalone:

Follow the install directions here: https://github.com/grosser/autotest