← Back to Upcase

Problem with guard-spork


(Chris Bradley) #1

I’m getting an error when attempting to run guard:

chrbradley@CBiMac ~/code/thoughtbot/hashtag[master]* $ guard
11:46:36 - INFO - Guard is using TerminalTitle to send notifications.
11:46:36 - INFO - Starting Spork for RSpec
Using RSpec
Preloading Rails environment
uninitialized constant ActiveModel::Observing (NameError)
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:56:in `preload_rails'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:7:in `preload'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/test_framework.rb:134:in `block in preload'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork.rb:62:in `exec_prefork'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/test_framework.rb:120:in `preload'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:25:in `preload'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/runner.rb:74:in `run'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/lib/spork/runner.rb:10:in `run'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/gems/spork-0.9.2/bin/spork:10:in `<top (required)>'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/bin/spork:23:in `load'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/bin/spork:23:in `<main>'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/chrbradley/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
11:47:07 - ERROR - Could not start Spork server for RSpec after 30 seconds. I will continue waiting for a further 60 seconds.

11:48:07 - ERROR - Could not start Spork server for RSpec. Make sure you can use it manually first.

11:48:07 - INFO - Guard is now watching at '/Users/chrbradley/code/thoughtbot/hashtag'

Any ides on how to troubleshoot this? Here’s the repo with the error:
https://github.com/chrbradley/hashtag


(Patrik Bóna) #2

Are you using Rails 4? Is spork alone working? What is in your Gemfile?

Try to use latest version of spork-rails and it should work. Add this to your Gemfile:

gem 'spork-rails', git: 'http://github.com/railstutorial/spork-rails.git'


(Chris Bradley) #3

Sorry I should have said that I’m using Rails 4.

Anyway, this worked. Thank you.


(Acandael Acandael) #4

Thanks a lot patrikbona, I had the same issue as Chris.

I added

gem 'spork-rails', git: 'http://github.com/railstutorial/spork-rails.git'

and Guard is starting up now without errors.

greetings,

Anthony


(Patrik Bóna) #5

Hello all,

Small update: version from original spork-rails repository should be already working too:

gem 'spork-rails', git: 'https://github.com/sporkrb/spork-rails'