Help us understand the problem. What is going on with this article?

rspec sporkが起動しない

More than 3 years have passed since last update.

sporkが起動しなくなった。

[hoge@CS-c014 apll]$ sudo bundle exec spork
Using RSpec, Rails
Preloading Rails environment
Loading Spork.prefork block...
cannot load such file -- spec_helper (LoadError)
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/poge/hoge/workspace/version/app/app_space/spec/support/lib/cached_object_loader_examples.rb:18:in `<top (required)>'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/poge/hoge/workspace/version/app/app_space/spec/spec_helper.rb:31:in `block (2 levels) in <top (required)>'
/poge/hoge/workspace/version/app/app_space/spec/spec_helper.rb:31:in `each'
/poge/hoge/workspace/version/app/app_space/spec/spec_helper.rb:31:in `block in <top (required)>'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork'
/poge/hoge/workspace/version/app/app_space/spec/spec_helper.rb:18:in `<top (required)>'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `block in load'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:138:in `block (2 levels) in preload'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-rails-4.0.0/lib/spork/app_framework/rails.rb:8:in `preload'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:134:in `block in preload'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork.rb:62:in `exec_prefork'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/test_framework.rb:120:in `preload'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:25:in `preload'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/runner.rb:75:in `run'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/lib/spork/runner.rb:10:in `run'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/spork-1.0.0rc4/bin/spork:10:in `<top (required)>'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/bin/spork:23:in `load'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/bin/spork:23:in `<main>'
No DRb server is running. Running in local process instead ...
No examples found.


Finished in 0.00058 seconds (files took 5.32 seconds to load)
0 examples, 0 failures

/poge/hoge/workspace/pogeapl/app/models/account.rb:100: warning: already initialized constant Account::DEFAULT_VALUES
/poge/hoge/workspace/pogeapl/app/models/account.rb:100: warning: previous definition of DEFAULT_VALUES was here
Exception encountered: #<NameError: uninitialized constant RSpec::Core::CommandLine>
backtrace:
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/test_framework/rspec.rb:11:in `run_tests'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:13:in `block in run'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:21:in `block in initialize'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `fork'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `initialize'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `new'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `run'
/poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/server.rb:49:in `run'
/poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1624:in `perform_without_block'
/poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1584:in `perform'
/poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1657:in `block (2 levels) in main_loop'
/poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1653:in `loop'
/poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1653:in `block in main_loop'

spec/support/*/.rbのとこにrequre spec_helperが入ってたのでそれを除くとsporkは起動。テストを流すと以下エラー。

    Exception encountered: #<NameError: uninitialized constant RSpec::Core::CommandLine>
    backtrace:
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/test_framework/rspec.rb:11:in `run_tests'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:13:in `block in run'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:21:in `block in initialize'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `fork'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/forker.rb:18:in `initialize'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `new'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/run_strategy/forking.rb:9:in `run'
    /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0rails/gems/spork-1.0.0rc4/lib/spork/server.rb:49:in `run'
    /poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1624:in `perform_without_block'
    /poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1584:in `perform'
    /poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1657:in `block (2 levels) in main_loop'
    /poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1653:in `loop'
    /poge/hoge/.rbenv/versions/2.2.3/lib/ruby/2.2.0/drb/drb.rb:1653:in `block in main_loop'

調べてみると、書いてある通りgemを編集したら動作

変更もマージされない。sporkに代わるものを使うのがいい?

bbrubymm
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away