ruby-on-rails rspec-rails guard spork

ruby on rails - Error en el inicio al usar Spork y Guard



ruby-on-rails rspec-rails (3)

Aquí está el problema. Cuando añadí la Guard gem la Guard gem todo estaba bien cuando llamaba Guard . Cuando agregué Spork , recibo el siguiente error que no afecta las pruebas, pero lo muestra cada vez que intento reiniciar Guard.

19:01:28 - INFO - Guard uses TerminalTitle to send notifications. 19:01:28 - INFO - Starting Spork for RSpec 19:01:28 - ERROR - Guard::Spork failed to achieve its <start>, exception was:

[# 5232DAD6505A] ChildProcess :: LaunchError: No existe tal archivo o directorio - paquete exec spork -p 8989 [# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/childprocess-0.3.7 /lib/childprocess/unix/fork_exec_process.rb:54:in launch_process'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/childprocess-0.3.7/lib/childprocess/abstract_process.rb:68:in start ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-spork-1.2.0/lib/guard/spork/spork_instance.rb : 38: en el start'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-spork-1.2.0/lib/guard/spork/runner.rb:33:in cada ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-spork-1.2.0/lib/guard/spork/runner.rb:33:in launch_sporks'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-spork-1.2.0/lib/guard/spork.rb:21:in start ''[# 5232DAD6505A] / Usuarios / periclestheodorou / .rvm / gems / ruby-1.9.3-p362 / gems / guard-1.6. 2 / lib / guard / runner.rb: 99: en block in run_supervised_task'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:97:in catch ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:97: in run_supervised_task'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:54:in block (2 niveles) en ejecute ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:175:in block (3 levels) in scoped_guards'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:174:in each'' [# 5232DAD6505A] / Users /periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:174:in block (2 levels) in scoped_guards'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:173:in catch ''[# 5232DAD6505A] / Users / periclest heodorou / .rvm / gems / ruby-1.9.3-p362 / gems / guard-1.6.2 / lib / guard / runner.rb: 173: en block in scoped_guards'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:172:in cada ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3 -p362 / gems / guard-1.6.2 / lib / guard / runner.rb: 172: en scoped_guards'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:53:in bloque en la ejecución ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/lumberjack-1.0.2/lib /lumberjack.rb:27:in unit_of_work'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/runner.rb:52:in run ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard.rb:187:in block in start'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard.rb:363:in block in within_preserved_state ''[# 5232DAD6505A]: 10: en synchronize'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard.rb:360:in synchronize'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard.rb:360:in within_preserved_state'' [# 5232DAD6505A] / Users / periclestheodorou / .rvm / gems / ruby-1.9.3-p362 / gems / guard-1.6.2 / lib / guard.rb: 185: in start'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/lib/guard/cli.rb:110:in start ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems /thor-0.17.0/lib/thor/task.rb:27:in run'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor/invocation.rb:120:in invoke_task ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor.rb:344 : en dispatch'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor/base.rb:434:in start'' [# 5232DAD6505A ] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/gems/guard-1.6.2/bin/guard:6:in <top (required)>'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/bin/guard:19:in <top (required)>'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/bin/guard:19:in carga ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/bin/guard:19:in <main>'' [#5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in eval ''[# 5232DAD6505A] /Users/periclestheodorou/.rvm/gems/ruby-1.9.3-p2 bin / ruby_noexec_wrapper: 14: en `''19:01:28 - INFO - Guard :: Spork acaba de ser despedido 19:01:28 - INFO - Guard :: RSpec se está ejecutando, con RSpec 2! 19:01:28 - INFO - Ejecutando todas las especificaciones No se está ejecutando ningún servidor DRb. Ejecutando en proceso local en su lugar ... No se encontraron ejemplos.

Terminado en 0.0001 segundos 0 ejemplos, 0 fallos

Aquí está el Gemfile

source ''https://rubygems.org'' gem ''rails'', ''3.2.11'' group :development, :test do gem ''sqlite3'', ''1.3.5'' gem ''rspec-rails'', ''2.11.0'' gem ''guard-rspec'', ''1.2.1'' gem ''guard-spork'', ''1.2.0'' gem ''spork'', ''0.9.2'' end group :assets do gem ''sass-rails'', ''3.2.5'' gem ''coffee-rails'', ''3.2.2'' gem ''uglifier'', ''1.2.3'' end gem ''jquery-rails'' group :test do gem ''capybara'', ''1.1.2'' gem ''rb-fsevent'', ''0.9.1'', :require => false end group :production do gem ''pg'', ''0.12.2'' end

spec_helper

require ''rubygems'' require ''spork'' Spork.prefork do # Loading more in this block will cause your tests to run faster. However, # if you change any configuration or code from libraries loaded here, you''ll # need to restart spork for it take effect. # This file is copied to spec/ when you run ''rails generate rspec:install'' ENV["RAILS_ENV"] ||= ''test'' require File.expand_path("../../config/environment", __FILE__) require ''rspec/rails'' require ''rspec/autorun'' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} RSpec.configure do |config| # == Mock Framework # # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: # # config.mock_with :mocha # config.mock_with :flexmock # config.mock_with :rr config.mock_with :rspec # Remove this line if you''re not using ActiveRecord or ActiveRecord fixtures config.fixture_path = "#{::Rails.root}/spec/fixtures" # If you''re not using ActiveRecord, or you''d prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. config.use_transactional_fixtures = true # If true, the base class of anonymous controllers will be inferred # automatically. This will be the default behavior in future versions of # rspec-rails. config.infer_base_class_for_anonymous_controllers = false end end Spork.each_run do # This code will be run each time you run your specs. end


Actualicé el Gemfile a ''guard-spork'', ''1.4.2'' y lo arreglé para mí.


Corriendo

bundle exec guard

en lugar de

guard

arreglado para mí


Ese es un problema conocido en guard-spork y puede usar la versión anterior de ChildProcess agregando:

gem ''childprocess'', ''0.3.6''

A su Gemfile o pruebe la rama maestra guard-spork, que solucionó el problema agregando lo siguiente a su Gemfile :

gem ''guard-spork'', :github => ''guard/guard-spork''