Im getting error: DRb server is down. A local process is running instead

I follow the ROR tutorials, Im testing with rspec spec / requests / static_pages_spec.rb, there was an error " No DRb server is running. Running in local process instead

" "I did some research, they said it because the Spork server is down, so I added Spork.each_run do

to the spc file, it doesn't help, i also changed the gem file from gem 'guard-spork'

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

. However, can anyone help? Thanks in advance!

Spec file:

require 'spec_helper'
Spork.each_run do
end
describe "Static pages" do
  let(:base_title) { "Ruby on Rails Tutorial Sample App" }
  describe "Home page" do
    it "should have the content 'Sample App'" do
      visit '/static_pages/home'
      expect(page).to have_content('Sample App')
    end
    it "should have the base title" do
      visit '/static_pages/home'
      expect(page).to have_title("Ruby on Rails Tutorial Sample App")
    end
    it "should not have a custom page title" do
      visit '/static_pages/home'
      expect(page).not_to have_title('| Home')
    end
    describe "Contact page" do
      it "should have the content 'Contact'" do
        visit '/static_pages/contact'
        expect(page).to have_content('Contact')
      end
      it "should have the title 'Contact'" do
        visit '/static_pages/contact'
        expect(page).to have_title("Ruby on Rails Tutorial Sample App | Contact")
      end
    end
  end
end

      

Gemfile:

source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.2'
gem 'bootstrap-sass', '2.3.2.0'
gem 'pg', '0.15.1'
group :development, :test do
  gem 'guard-spork', :github => 'guard/guard-spork'
  gem 'sprockets', '2.11.0'
  gem 'rspec-rails', '2.13.1'
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'childprocess', '0.3.6'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
gem 'rails_12factor', group: :production
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

      

+3


source to share


1 answer


You must start spork in another process with the command spork

. Also remove the Spork part from the test and change the file spec_helper

with something like this (move everything to a block Spork.prefork

)



Another thing is that Spork has been replaced (not directly) by spring , which does the same thing, but without additional configuration.

+4


source







All Articles