I am trying to setup a CI pipeline using Github Actions. At bundle exec rubocop in my workflow it fails. But the command completely passes locally when run on the rails project.
name: CI - To check on linters and run test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-n-test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- uses: actions/checkout#v1
- uses: ruby/setup-ruby#v1
with:
bundler-cache: true
- name: RuboCop
run: bundle exec rubocop
- name: RSpec
run: bundle exec rspec
What I may be missing in the workflow.
It fails with:
Unable to find gem rubocop-discourse; is the gem installed? Gem::MissingSpecError
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:278:in `rescue in gem_config_path'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:268:in `gem_config_path'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:69:in `block (2 levels) in resolve_inheritance_from_gems'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:67:in `reverse_each'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:67:in `block in resolve_inheritance_from_gems'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:61:in `each_pair'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader_resolver.rb:61:in `resolve_inheritance_from_gems'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader.rb:50:in `load_file'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_loader.rb:103:in `configuration_from_file'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_store.rb:68:in `for_dir'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/config_store.rb:58:in `for'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:161:in `ruby_interpreters'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:153:in `ruby_executable?'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:169:in `ruby_file?'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:73:in `to_inspect?'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:64:in `block in target_files_in_dir'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:64:in `select'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:64:in `target_files_in_dir'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/target_finder.rb:32:in `find'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:77:in `find_target_files'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/runner.rb:42:in `run'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/command.rb:11:in `run'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli/environment.rb:18:in `run'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:71:in `run_command'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:78:in `execute_runners'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/lib/rubocop/cli.rb:47:in `run'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/exe/rubocop:12:in `block in <top (required)>'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/3.0.0/benchmark.rb:308:in `realtime'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/gems/rubocop-1.22.0/exe/rubocop:12:in `<top (required)>'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/bin/rubocop:23:in `load'
/home/runner/work/drug_trial_mgmt_system/drug_trial_mgmt_system/vendor/bundle/ruby/3.0.0/bin/rubocop:23:in `<top (required)>'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
/opt/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
/opt/hostedtoolcache/Ruby/3.0.0/x64/bin/bundle:23:in `load'
/opt/hostedtoolcache/Ruby/3.0.0/x64/bin/bundle:23:in `<main>'
Error: Process completed with exit code 2.
It looks like your RuboCop is finding a configuration file that is part of your dependencies. Normally anything in vendor/ is ignored, but it seems your configuration is overriding that. It should be possible to fix it with something like:
AllCops:
Exclude:
- 'vendor/'
I had to add - 'vendor/**/*' (please note that sma answer 'vendor/*/**'is slightly different and did not worked for me) in order to work properly. Took it from: https://github.com/reviewdog/action-rubocop/blob/master/.rubocop.yml
Related
I am trying to add Tailwind to existing Rails project and I am referring to this documentation: https://tailwindcss.com/docs/guides/ruby-on-rails
However, when I am in step 5 "Run your build process with ./bin/dev.", I am getting following error and I am not sure how to fix it.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `block in run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `chdir'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:367:in `block (2 levels) in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `upto'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `block in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:57:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
from C:/Ruby31-x64/bin/foreman:32:in `load'
from C:/Ruby31-x64/bin/foreman:32:in `<main>'
It seems like something related to foreman gem. Did anyone encountered similar problem?
After upgrading rspec 2.99 to rspec 3, I'm getting following error on CircleCI rspec_junit_formatter.rb:73:in '%': can't convert nil into Float (TypeError) and none of the specs are running.
The specs are running with rspec 2.99, but fails with rspec > 3.0
bundler: failed to load command: rspec (/home/circleci/test-application/vendor/bundle/ruby/2.4.0/bin/rspec)
Coverage report generated for RSpec to /home/circleci/test-application/coverage. 5908 / 17112 LOC (34.53%) covered.
/home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:73:in `%': can't convert nil into Float (TypeError)
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:73:in `xml_dump_example'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:46:in `block in xml_dump_examples'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:39:in `each'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:39:in `xml_dump_examples'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter.rb:34:in `xml_dump'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter/rspec3.rb:21:in `block in dump_summary'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter/rspec3.rb:111:in `swap_rspec_configuration'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter/rspec3.rb:128:in `without_color'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter/rspec3.rb:21:in `dump_summary'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:137:in `block in notify'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:136:in `each'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:136:in `notify'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:118:in `finish'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:56:in `ensure in report'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:56:in `report'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:108:in `run_specs'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:86:in `run'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/bin/rspec:25:in `load'
from /home/circleci/test-application/vendor/bundle/ruby/2.4.0/bin/rspec:25:in `<top (required)>'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `load'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:23:in `run'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli.rb:483:in `exec'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli.rb:31:in `dispatch'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/cli.rb:25:in `start'
from /home/circleci/.rubygems/gems/bundler-2.3.12/exe/bundle:48:in `block in <top (required)>'
from /home/circleci/.rubygems/gems/bundler-2.3.12/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /home/circleci/.rubygems/gems/bundler-2.3.12/exe/bundle:36:in `<top (required)>'
from /home/circleci/.rubygems/bin/bundle:25:in `load'
from /home/circleci/.rubygems/bin/bundle:25:in `<main>'
Exited with code exit status 1
circleci config.yml
- run:
name: Run tests
command: |
mkdir ~/test_results
circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings> /tmp/tests-to-run
bundle exec rspec $(cat /tmp/tests-to-run) --format documentation --profile --format RspecJunitFormatter -o ~/test_results/rspec.xml
rspec 3.0
rspec_junit_formatter 0.5.1
ruby 2.4
The above error is fixed in rspec_junit_formatter v0.6
More info on github issue
Rails 7.0.0.alpha2
Circle CI
Rspec
using default setup from
https://github.com/CircleCI-Public/circleci-demo-ruby-rails
Circle CI crashes with:
bundler: failed to load command: rspec (/home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec)
LoadError: cannot load such file -- rspec_junit_formatter
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:235:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:235:in `rescue in custom_formatter'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:232:in `custom_formatter'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:183:in `find_formatter'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:152:in `add'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:974:in `add_formatter'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `block in load_formatters_into'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `each'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `load_formatters_into'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:24:in `configure'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:132:in `configure'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:99:in `setup'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:86:in `run'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec:23:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec:23:in `<top (required)>'
Exited with code exit status 1
CircleCI received exit code 1
fixed with:
add to Gemfile and run bundle install
gem 'rspec_junit_formatter'
Pronto fails to run in CircleCI build completes. I'm running Rails 4.2.9 and Ruby 2.4.0.
My circle.yml is:
test:
override:
- bundle exec rake test:all
post:
- if [[ ! -z $CI_PULL_REQUEST ]] ; then bundle exec pronto run -f github_pr -c origin/master ; fi
On running the pronto run command:
bundler: failed to load command: pronto(/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto)
Rugged::OdbError: object not found - no match for id (f61b491d0dbd5b3c13ad529587a06939fa1f54bc)
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/repository.rb:52:in `new'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/repository.rb:52:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/patch.rb:17:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/line.rb:45:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/line.rb:20:in `commit_sha'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/message.rb:18:in `initialize'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new_message'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block (2 levels) in inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block in inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:20:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `each'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto.rb:64:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:61:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `chdir'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/bin/pronto:6:in `<top (required)>'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto:23:in `load'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto:23:in `<top (required)>'
Any pointers on this issue would be super helpful! TIA.
I'm trying to debug my rails application with the derailed_benchmarks gem. I am following the instructions on their Github. I can run my server locally in production, but when I try to execute the command derailed exec perf:mem_over_time I get the following error:
/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:92:in `call_app': Bad request: <html><body>You are being redirected.</body></html> (RuntimeError)
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:145:in `block (2 levels) in <top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/cowan/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:41:in `exec'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:85:in `<top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `load'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `<main>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Any help is greatly appreciated.
My application uses puma, so I had to specify that when I ran the command.
$ USE_SERVER=puma derailed exec perf:mem_over_time