gqli
gqli

Reputation: 1045

Im getting error : No DRb server is running. Running in local process instead

I'm following the ROR tutorials , Im testing with rspec spec/requests/static_pages_spec.rb , Error occurred " No DRb server is running. Running in local process instead"' I did some research , they said it's because Spork server is not running , so i added Spork.each_run do to the spc file, it dosen't help , I also modified the gem file from gem 'guard-spork' to gem 'guard-spork', :github => 'guard/guard-spork' Still the same, Anyone can 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]

Upvotes: 3

Views: 2097

Answers (1)

Alexander Kireyev
Alexander Kireyev

Reputation: 10825

You should run spork in different process with command spork. Also, remove Spork part from test and modify you spec_helper file with something like this (move all in Spork.prefork block)

The other thing is that Spork had been replaced (not directly) by spring that does the same thing, but without additional configuration.

Upvotes: 4

Related Questions