Rails - ruby/2.1.0/minitest/parallel_each.rb:67:in

2019-07-16 05:34发布

I cloned this repository: https://github.com/railstutorial/sample_app_rails_4

I followed the instructions to setup the project in my local machine:

cd /tmp
git clone https://github.com/railstutorial/sample_app_rails_4.git
cd sample_app_rails_4
cp config/database.yml.example config/database.yml
bundle install --without production
bundle exec rake db:migrate
bundle exec rake db:test:prepare
bundle exec rspec spec/

but when I run "bundle exec rspec spec" for testing I got this output:

No DRb server is running. Running in local process instead ...
/usr/lib/ruby/2.1.0/minitest/parallel_each.rb:67:in `<class:Unit>': undefined method `_run_suites' for class `Minitest::Unit' (NameError)
    from /usr/lib/ruby/2.1.0/minitest/parallel_each.rb:66:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/testing/isolation.rb:2:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/test_case.rb:9:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/actionpack-4.0.8/lib/action_controller/test_case.rb:405:in `<module:ActionController>'
    from /var/lib/gems/2.1.0/gems/actionpack-4.0.8/lib/action_controller/test_case.rb:6:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:9:in `<module:ControllerExampleGroup>'
    from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:6:in `<module:Rails>'
    from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:5:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example.rb:2:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails.rb:16:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
    from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/spec_helper.rb:7:in `block in <top (required)>'
    from /var/lib/gems/2.1.0/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork'
    from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/spec_helper.rb:4:in `<top (required)>'
    from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb:1:in `require'
    from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb:1:in `<top (required)>'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:77:in `rescue in run'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:73:in `run'
    from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'

My computer: Ubuntu(14.04) My rails version is: 4.0.8 My ruby version is: ruby 2.1.3p242 (2014-09-19 revision 45877) [x86_64-linux-gnu]

I couldn't find much help on google, and I'm really struggling to solve this problem


A useful information, when I use nitrous.io and setup the project there everything works just fine, maybe something is wrong with my computer?

0条回答
登录 后发表回答