# \#rspec

**URL:** https://discuss.circleci.com/tag/rspec/59.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [Example of splitting by test name for rspec rails](https://discuss.circleci.com/t/example-of-splitting-by-test-name-for-rspec-rails/51459)

<div class="topic-metadata">

**Author:** [@zmf-framework](https://discuss.circleci.com/u/zmf-framework)\
**Replies:** 12\
**Last updated:** [June 17, 2025, 11:09pm UTC](https://discuss.circleci.com/t/example-of-splitting-by-test-name-for-rspec-rails/51459 "2025-06-17T23:09:21Z")

</div>

Does anyone here have an example app using --split-by=timings --timings-type=name successfully with Rspec/Rails in a parallelized (20 - 30 containers) set up? I can’t seem to get this to work. My current command is cir…

---

## [No timing data found when splitting by testname, and it does outputs file names instead of expected test names](https://discuss.circleci.com/t/no-timing-data-found-when-splitting-by-testname-and-it-does-outputs-file-names-instead-of-expected-test-names/53259)

<div class="topic-metadata">

**Author:** [@henrahmagix](https://discuss.circleci.com/u/henrahmagix)\
**Replies:** 1\
**Last updated:** [May 20, 2025, 2:48pm UTC](https://discuss.circleci.com/t/no-timing-data-found-when-splitting-by-testname-and-it-does-outputs-file-names-instead-of-expected-test-names/53259 "2025-05-20T14:48:35Z")

</div>

How can I get circleci tests split --split-by=timings --timings-type=testname to output test names instead of filenames? And correctly find timings data? I’d like to end up with a computed command like: rspec --example…

---

## [ActiveRecord::ConnectionNotEstablished: PQsocket() can't get socket descriptor](https://discuss.circleci.com/t/activerecord-pqsocket-cant-get-socket-descriptor/53161)

<div class="topic-metadata">

**Author:** [@kreintjes](https://discuss.circleci.com/u/kreintjes)\
**Replies:** 0\
**Last updated:** [April 24, 2025, 1:13pm UTC](https://discuss.circleci.com/t/activerecord-pqsocket-cant-get-socket-descriptor/53161 "2025-04-24T13:13:22Z")

</div>

Since yesterday we suddenly get PQsocket errors on (almost) all of our system tests for one of our applications. The exact error is: ActiveRecord::ConnectionNotEstablished: PQsocket() can't get socket descriptor …

---

## [Unable to load files in rspec when using test splitting](https://discuss.circleci.com/t/unable-to-load-files-in-rspec-when-using-test-splitting/52043)

<div class="topic-metadata">

**Author:** [@chandan-roo](https://discuss.circleci.com/u/chandan-roo)\
**Replies:** 0\
**Last updated:** [September 26, 2024, 5:03am UTC](https://discuss.circleci.com/t/unable-to-load-files-in-rspec-when-using-test-splitting/52043 "2024-09-26T05:03:36Z")

</div>

We have a circleci config something like this (pasting only the core part of it): commands: setup\_docker: steps: - setup\_remote\_docker: docker\_layer\_caching: true version: default -…

---

## [Using Ruby orb to run RSpec Tests Isn't Running All Tests](https://discuss.circleci.com/t/using-ruby-orb-to-run-rspec-tests-isnt-running-all-tests/49922)

<div class="topic-metadata">

**Author:** [@joshmgrant](https://discuss.circleci.com/u/joshmgrant)\
**Replies:** 5\
**Last updated:** [November 27, 2023, 5:53pm UTC](https://discuss.circleci.com/t/using-ruby-orb-to-run-rspec-tests-isnt-running-all-tests/49922 "2023-11-27T17:53:20Z")

</div>

I’m working with a Rails project that has a fairly large set of tests. These tests have been executed on Circle using the ruby orb and the rspec-test task. When tests get executed using ruby/rspec-test: order…

---

## [Can 'circleci tests split' be used per directory?](https://discuss.circleci.com/t/can-circleci-tests-split-be-used-per-directory/48504)

<div class="topic-metadata">

**Author:** [@yuji-tamai](https://discuss.circleci.com/u/yuji-tamai)\
**Replies:** 0\
**Last updated:** [June 30, 2023, 5:16am UTC](https://discuss.circleci.com/t/can-circleci-tests-split-be-used-per-directory/48504 "2023-06-30T05:16:59Z")

</div>

I’m running rspec with the following settings. TESTFILES=$(circleci tests glob "spec/\*\*/\*\_spec.rb" | circleci tests split --split-by=timings) bundle exec rspec $TESTFILES This setting causes strange rspec errors, proba…

---

## [Running circleci tests run does not run all my examples](https://discuss.circleci.com/t/running-circleci-tests-run-does-not-run-all-my-examples/47783)

<div class="topic-metadata">

**Author:** [@guiracine](https://discuss.circleci.com/u/guiracine)\
**Replies:** 3\
**Last updated:** [May 15, 2023, 2:38pm UTC](https://discuss.circleci.com/t/running-circleci-tests-run-does-not-run-all-my-examples/47783 "2023-05-15T14:38:12Z")

</div>

Hi, I changed my test step to use circleci tests run to take advantage of the new --fail-fast feature. Previously I was using the ruby/rspecs-test orb. Now I change to use this step’s command: RSPEC\_FILES=$(circleci …

---

## [ActiveRecord error when running db:schema:load - "NoMethodError: undefined method 'uuid'"](https://discuss.circleci.com/t/activerecord-error-when-running-dbload-nomethoderror-undefined-method-uuid/45241)

<div class="topic-metadata">

**Author:** [@ambreenhasan](https://discuss.circleci.com/u/ambreenhasan)\
**Replies:** 0\
**Last updated:** [August 30, 2022, 6:18pm UTC](https://discuss.circleci.com/t/activerecord-error-when-running-dbload-nomethoderror-undefined-method-uuid/45241 "2022-08-30T18:18:20Z")

</div>

I’m running into an issue when running bundle exec rake db:schema:load when setting up the test database before tests can be ran: “NoMethodError: undefined method \`uuid’ for ActiveRecord” This happens when a table that…

---

## [Split-by=timings not splitting evenly](https://discuss.circleci.com/t/split-by-timings-not-splitting-evenly/43906)

<div class="topic-metadata">

**Author:** [@archonic](https://discuss.circleci.com/u/archonic)\
**Replies:** 0\
**Last updated:** [May 3, 2022, 9:35pm UTC](https://discuss.circleci.com/t/split-by-timings-not-splitting-evenly/43906 "2022-05-03T21:35:23Z")

</div>

I’m splitting by timings but I’ve noticed from the Timings tab that they are not evenly split. I could be done my suite in around half the time if it wasn’t running so many tests on run #0 I’ve tried renaming the pat…

---

## [Error Splitting Test Timings in RSpec and Ruby - Autodetect no matching filename or classname](https://discuss.circleci.com/t/error-splitting-test-timings-in-rspec-and-ruby-autodetect-no-matching-filename-or-classname/42978)

<div class="topic-metadata">

**Author:** [@danielwellman](https://discuss.circleci.com/u/danielwellman)\
**Replies:** 1\
**Last updated:** [February 17, 2022, 4:12am UTC](https://discuss.circleci.com/t/error-splitting-test-timings-in-rspec-and-ruby-autodetect-no-matching-filename-or-classname/42978 "2022-02-17T04:12:04Z")

</div>

Hello, I am having problems setting up parallel runs with my RSpec build. I can successfully find and run the tests, however I am unable to match the timing data. I get an error of this form from the CircleCI tests spl…

---

## [Rspec capybara test fails with "unknown error: DevToolsActivePort file doesn't exist"](https://discuss.circleci.com/t/rspec-capybara-test-fails-with-unknown-error-devtoolsactiveport-file-doesnt-exist/42528)

<div class="topic-metadata">

**Author:** [@jeffreycastro](https://discuss.circleci.com/u/jeffreycastro)\
**Replies:** 1\
**Last updated:** [January 11, 2022, 8:45am UTC](https://discuss.circleci.com/t/rspec-capybara-test-fails-with-unknown-error-devtoolsactiveport-file-doesnt-exist/42528 "2022-01-11T08:45:28Z")

</div>

Hello! My rspec feature test fail with the ff: Failure/Error: visit "/user\_update" Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: exited abnormally. (unknown error…

---

## [React components not being rendered when running feature specs on circleci](https://discuss.circleci.com/t/react-components-not-being-rendered-when-running-feature-specs-on-circleci/41715)

<div class="topic-metadata">

**Author:** [@lidimayra](https://discuss.circleci.com/u/lidimayra)\
**Replies:** 1\
**Last updated:** [October 30, 2021, 8:13pm UTC](https://discuss.circleci.com/t/react-components-not-being-rendered-when-running-feature-specs-on-circleci/41715 "2021-10-30T20:13:24Z")

</div>

Hello! I have a small Rails project and the front-end is built with ReactJS. I have some feature specs, and they work fine locally, but fail when running on circleci. My last attempt can be found here: And this is t…

---

## [Rspec output dots go off screen (no newlines) or newlines are inserted each 5 tests](https://discuss.circleci.com/t/rspec-output-dots-go-off-screen-no-newlines-or-newlines-are-inserted-each-5-tests/37874)

<div class="topic-metadata">

**Author:** [@trizes](https://discuss.circleci.com/u/trizes)\
**Replies:** 2\
**Last updated:** [May 7, 2021, 7:42pm UTC](https://discuss.circleci.com/t/rspec-output-dots-go-off-screen-no-newlines-or-newlines-are-inserted-each-5-tests/37874 "2021-05-07T19:42:46Z")

</div>

When I open console output for Rspec tests it’s output keeps going to newline each 5 tests (dots). If you open finished build or build that was running for some time, tests that already passed are all gathered on a sing…

---

## [RSpec in circleci deployment](https://discuss.circleci.com/t/rspec-in-circleci-deployment/39844)

<div class="topic-metadata">

**Author:** [@hardreggaecafe](https://discuss.circleci.com/u/hardreggaecafe)\
**Replies:** 0\
**Last updated:** [April 21, 2021, 12:00am UTC](https://discuss.circleci.com/t/rspec-in-circleci-deployment/39844 "2021-04-21T00:00:35Z")

</div>

Hi there. I got the error when running circleci deploy. I tried to implement RSpec in circleci deployment. #!/bin/bash --login bundle exec rake db:create bundle exec rake db:schema:load I, \[2021-04-20T08:36:32.197469…

---

## [Getting ThinkingSphinx to run in RSpec](https://discuss.circleci.com/t/getting-thinkingsphinx-to-run-in-rspec/33670)

<div class="topic-metadata">

**Author:** [@kayla](https://discuss.circleci.com/u/kayla)\
**Replies:** 2\
**Last updated:** [January 6, 2020, 12:34am UTC](https://discuss.circleci.com/t/getting-thinkingsphinx-to-run-in-rspec/33670 "2020-01-06T00:34:44Z")

</div>

I’m working on setting up CircleCI for a Rails 5.1 / Ruby 2.3.1 application. We are looking to use Circle primarily to run our specs. This application uses ThinkingSphinx for search, and we have some specs that rely on …

---

## [How do I configure Circle to accept pending tests when evaluating a build?](https://discuss.circleci.com/t/how-do-i-configure-circle-to-accept-pending-tests-when-evaluating-a-build/31685)

<div class="topic-metadata">

**Author:** [@Arepo](https://discuss.circleci.com/u/Arepo)\
**Replies:** 3\
**Last updated:** [August 2, 2019, 12:51pm UTC](https://discuss.circleci.com/t/how-do-i-configure-circle-to-accept-pending-tests-when-evaluating-a-build/31685 "2019-08-02T12:51:13Z")

</div>

Given a Rails app running an RSpec test suite, how do I configure Circle to consider test suites that include pending tests (but are otherwise green) to have passed? Current config.yml text follows (I’ll keep an eye on …

---

## [RSpec tests time out after upgrading to ruby 2.6.x](https://discuss.circleci.com/t/rspec-tests-time-out-after-upgrading-to-ruby-2-6-x/28547)

<div class="topic-metadata">

**Author:** [@pacso](https://discuss.circleci.com/u/pacso)\
**Replies:** 12\
**Last updated:** [February 26, 2019, 8:50am UTC](https://discuss.circleci.com/t/rspec-tests-time-out-after-upgrading-to-ruby-2-6-x/28547 "2019-02-26T08:50:44Z")

</div>

I have a test suite which is currently running perfectly with Ruby 2.5.3. I have a branch to update the version of Ruby to 2.6.1. In this branch all of the tests pass successfully, and the test output is identical to th…

---

## [Issue with splitting tests by workflows](https://discuss.circleci.com/t/issue-with-splitting-tests-by-workflows/27531)

<div class="topic-metadata">

**Author:** [@skyeagle](https://discuss.circleci.com/u/skyeagle)\
**Replies:** 0\
**Last updated:** [January 7, 2019, 11:48pm UTC](https://discuss.circleci.com/t/issue-with-splitting-tests-by-workflows/27531 "2019-01-07T23:48:30Z")

</div>

We have an issue wrt splitting tests within workflows. Basically, there are 2 workflows defined stream1: \<\<: \*defaults parallelism: 2 steps: - attach\_workspace: at: /home/circleci - r…

---

## [Tests were split and rspec](https://discuss.circleci.com/t/tests-were-split-and-rspec/26759)

<div class="topic-metadata">

**Author:** [@DevDude](https://discuss.circleci.com/u/DevDude)\
**Replies:** 0\
**Last updated:** [November 27, 2018, 6:02pm UTC](https://discuss.circleci.com/t/tests-were-split-and-rspec/26759 "2018-11-27T18:02:18Z")

</div>

Hi, I have setup the parallelism option with rspec, and out of the whole suite of tests (~800 tests), only 5 are failing because the before(:each) block is not being executed by rspec properly, have you ran into this iss…

---

## [Rails rspec test fail: Exited with code 1](https://discuss.circleci.com/t/rails-rspec-test-fail-exited-with-code-1/21747)

<div class="topic-metadata">

**Author:** [@adnan358](https://discuss.circleci.com/u/adnan358)\
**Replies:** 0\
**Last updated:** [April 18, 2018, 1:25pm UTC](https://discuss.circleci.com/t/rails-rspec-test-fail-exited-with-code-1/21747 "2018-04-18T13:25:07Z")

</div>

I have a rails project, and I do rspec feature test. But ı take this error Exited with code 1 config.yml version: 2 jobs: build: docker: # specify the version you desire here - image: circleci/ruby…

---

## [Timecop rspec tests failing](https://discuss.circleci.com/t/timecop-rspec-tests-failing/2411)

<div class="topic-metadata">

**Author:** [@jtmarmon](https://discuss.circleci.com/u/jtmarmon)\
**Replies:** 5\
**Last updated:** [April 11, 2018, 8:28pm UTC](https://discuss.circleci.com/t/timecop-rspec-tests-failing/2411 "2018-04-11T20:28:29Z")

</div>

We have a test that is successful on our dev machines (both mine and a co-worker). It is a DateTime comparison in a timecop block. On circleci, it gives an inexplicable error: expected: 2016-03-08 03:22:05.693965452 +0…

---

## [Rake spec passes all tests then fails from non-zero exit code](https://discuss.circleci.com/t/rake-spec-passes-all-tests-then-fails-from-non-zero-exit-code/20428)

<div class="topic-metadata">

**Author:** [@Fir3Chi3f](https://discuss.circleci.com/u/Fir3Chi3f)\
**Replies:** 2\
**Last updated:** [March 5, 2018, 6:24pm UTC](https://discuss.circleci.com/t/rake-spec-passes-all-tests-then-fails-from-non-zero-exit-code/20428 "2018-03-05T18:24:20Z")

</div>

I’ve been working to migrate to 2.0 and this is the last issue I’m having. All our tests prior (bundle exec rspec) pass as well as all tests seem to pass with rake spec:javascript however for some reason there is a non-z…

---

## [Circle ci tests are failing randomly](https://discuss.circleci.com/t/circle-ci-tests-are-failing-randomly/19858)

<div class="topic-metadata">

**Author:** [@aruprakshit](https://discuss.circleci.com/u/aruprakshit)\
**Replies:** 2\
**Last updated:** [February 5, 2018, 7:24pm UTC](https://discuss.circleci.com/t/circle-ci-tests-are-failing-randomly/19858 "2018-02-05T19:24:15Z")

</div>

My tests are always green in local machine. I do have codebase built on Ruby on Rails framework. But in CI my tests fails randomly and after doing retry with cache with 3-4 times it gets passed. Most of the time I see er…

---

## [Test cases fails if parallelism is used, passes otherwise](https://discuss.circleci.com/t/test-cases-fails-if-parallelism-is-used-passes-otherwise/18828)

<div class="topic-metadata">

**Author:** [@KapilMetacube](https://discuss.circleci.com/u/KapilMetacube)\
**Replies:** 1\
**Last updated:** [January 2, 2018, 5:59am UTC](https://discuss.circleci.com/t/test-cases-fails-if-parallelism-is-used-passes-otherwise/18828 "2018-01-02T05:59:09Z")

</div>

Mine is a Rails application using rspec for test cases. When I try to run test cases in parallel containers they get failed but passes otherwise. It was working fine earlier. “So, When did this all start?” I just upgr…

---

## [Different result depending the container number](https://discuss.circleci.com/t/different-result-depending-the-container-number/10283)

<div class="topic-metadata">

**Author:** [@jpiqueras](https://discuss.circleci.com/u/jpiqueras)\
**Replies:** 2\
**Last updated:** [January 2, 2018, 5:57am UTC](https://discuss.circleci.com/t/different-result-depending-the-container-number/10283 "2018-01-02T05:57:02Z")

</div>

I'm testing CircleCI and so far it looks good. But I'm facing a weird problem with parallelisation. I'm running a build with 2 containers. And using a bash case statement to select which commands (rspec) to run in each…

---

## [Redirect to HTTPS for custom domain when always\_use\_ssl is true: does not happen over HTTPS](https://discuss.circleci.com/t/redirect-to-https-for-custom-domain-when-always-use-ssl-is-true-does-not-happen-over-https/18763)

<div class="topic-metadata">

**Author:** [@oberon555](https://discuss.circleci.com/u/oberon555)\
**Replies:** 1\
**Last updated:** [December 17, 2017, 10:22pm UTC](https://discuss.circleci.com/t/redirect-to-https-for-custom-domain-when-always-use-ssl-is-true-does-not-happen-over-https/18763 "2017-12-17T22:22:22Z")

</div>

Hello. When I run tests for sharetribe, I get errors that I do not know how to fix. The first error is: Redirect to HTTPS for custom domain when always\_use\_ssl is true: does not happen over HTTPS Failure/Error: expe…

---

## [Parallel tests (cuc+rspec) w/failures exit early leaving less workers to finish](https://discuss.circleci.com/t/parallel-tests-cuc-rspec-w-failures-exit-early-leaving-less-workers-to-finish/18081)

<div class="topic-metadata">

**Author:** [@rosskevin](https://discuss.circleci.com/u/rosskevin)\
**Replies:** 1\
**Last updated:** [November 14, 2017, 3:04pm UTC](https://discuss.circleci.com/t/parallel-tests-cuc-rspec-w-failures-exit-early-leaving-less-workers-to-finish/18081 "2017-11-14T15:04:14Z")

</div>

We have 7x parallelism, with cucumber running first then rspec (using knapsack pro). The problem is that when a cucumber test fails on a worker, that worker fully exits and leaves fewer than 7 to run rspec (not all work…

---

## [Mysql2::Error: Can't connect to MySQL server on '127.0.0.1' (111)](https://discuss.circleci.com/t/mysql2-error-cant-connect-to-mysql-server-on-127-0-0-1-111/17183)

<div class="topic-metadata">

**Author:** [@HiromuMasuda](https://discuss.circleci.com/u/HiromuMasuda)\
**Replies:** 2\
**Last updated:** [October 14, 2017, 6:57am UTC](https://discuss.circleci.com/t/mysql2-error-cant-connect-to-mysql-server-on-127-0-0-1-111/17183 "2017-10-14T06:57:37Z")

</div>

I’m trying to upgrade circleCI from 1.0 to 2.0. I changed the code referring to the document, but I got the unknown error, #!/bin/bash -eo pipefail RAILS\_ENV=test bundle exec rake db:schema:load ... rake aborted! Mysql…

---

## [Test timings not available from store\_test\_results](https://discuss.circleci.com/t/test-timings-not-available-from-store-test-results/16295)

<div class="topic-metadata">

**Author:** [@edkellena](https://discuss.circleci.com/u/edkellena)\
**Replies:** 0\
**Last updated:** [September 6, 2017, 1:54pm UTC](https://discuss.circleci.com/t/test-timings-not-available-from-store-test-results/16295 "2017-09-06T13:54:46Z")

</div>

Hey, we are splitting our rspec tests across parallel nodes to decrease the end-to-end time, and we're trying to do it by the timings split type as specified here: https://circleci.com/docs/2.0/parallelism-faster-jobs/#s…

---

## [Tests fail due to non-updated code base](https://discuss.circleci.com/t/tests-fail-due-to-non-updated-code-base/15959)

<div class="topic-metadata">

**Author:** [@Virolea](https://discuss.circleci.com/u/Virolea)\
**Replies:** 1\
**Last updated:** [August 31, 2017, 7:48am UTC](https://discuss.circleci.com/t/tests-fail-due-to-non-updated-code-base/15959 "2017-08-31T07:48:10Z")

</div>

Hi, After force-pushing to my Github repo, the tests started to fail on CircleCI. My tests pass locally and the test errors referred to a chunk of code in one of my factory that does note exist anymore after my last pu…

[Next page](https://discuss.circleci.com/tag/rspec/59.md?match_all_tags=true&page=1&tags%5B%5D=rspec)
