Rails: LocalJumpError: no block given (yield)

Hi all,
i created CI for ruby on rails like this:


on:
  pull_request:
    branches: ['*']
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:12.1-alpine
        env:
          POSTGRES_USER: 'lucapg'
          POSTGRES_PASSWORD: 'eriluca2020'
        ports:
        - 5432:5432
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
    steps:
      - uses: actions/checkout@v2
      - name: Setup Ruby 2.6.3
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6.3
          bundler: default
          bundler-cache: true
 
      - name: Build app
        env:
          PGHOST: localhost
          POSTGRES_USER: 'lucapg'
          POSTGRES_PASSWORD: 'eriluca2020'
          RAILS_ENV: test
        run: |
          bin/rails db:create
          bin/rails db:migrate
          
      - name: Run Tests
        env:
          PGHOST: localhost
          POSTGRES_USER: 'lucapg'
          POSTGRES_PASSWORD: 'eriluca2020'
          RAILS_ENV: test
        run: |
          bin/rails spec

I use the gem Dry Monads to implement a Service object. When I run rspc on my local machine, all is ok and my test reply Success(true) or Success(false). When I run CI on githib actions, I have this error:

1) Production when create production items create production workflow for a lot
  Failure/Error: expect(response).to eq(Dry::Monads::Success(false)) # procedure not assigned

       expected: Success(false)
          got: Failure(#<LocalJumpError: no block given (yield)>)'

Can you help me to understand this issue?
Regards
Luca Colombini