Error: SimpleCov failed with exit 1

183 views
Skip to first unread message

John Cowan

unread,
Apr 8, 2020, 1:18:58 PM4/8/20
to SimpleCov
Hey all
I'm upgrading a rails app from rails 4.2 to 5.0.  It is using ruby 2.6.4.

When I run my spec tests, I get the error: SimpleCov faild with exit 1.   I cannot find any info on this using Google.  I've read through the documentation for the gem, but I cannot find any info that helps me with what is causing this or how to fix it.

Gemfile:
    `gem 'rails', '~> 5.0'

I also made these changes in Gemfile to get bundle update rails to work.

-gem 'sass-rails', '~> 4.0.3'
+gem 'sass-rails'
-gem 'coffee-rails', '~> 4.0.0'
+gem 'coffee-rails'

----------------------------

Gemfile.lock
simplecov (0.18.5)
  docile (~> 1.1)
  simplecov-html (~> 0.11)
simplecov-html (0.12.2)

----------------------------

To quiet a couple of un-related deprecation warnings, I had to make changes to these files

config/environments/production.rb
-  config.serve_static_files = false
+  config.public_file_server.enabled = false

config/environments/staging.rb
-  config.serve_static_files = false
+  config.public_file_server.enabled = false

config/environments/test.rb
-  config.serve_static_files = true
+  config.public_file_server.enabled = true
 
-  config.static_cache_control = "public, max-age=3600"
+  config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }

----------------------------

jdc44@dev:~/apps/ereqs$ bundle exec rake
...
Coverage report generated for RSpec to /home/STATLER/jdc44/apps/ereqs/coverage. 3 / 892 LOC (0.34%) covered.
SimpleCov failed with exit 1
Traceback (most recent call last):
    30: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/exe/rspec:4:in `<main>'
    29: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:45:in `invoke'
    28: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:71:in `run'
    27: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:86:in `run'
    26: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/runner.rb:100:in `setup'
    25: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1433:in `load_spec_files'
    24: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1433:in `each'
    23: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1435:in `block in load_spec_files'
    22: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.5.3/lib/rspec/core/configuration.rb:1435:in `load'
    21: from /home/STATLER/jdc44/apps/ereqs/spec/controllers/admins/account_codes_controller_spec.rb:1:in `<top (required)>'
    20: from /home/STATLER/jdc44/apps/ereqs/spec/controllers/admins/account_codes_controller_spec.rb:1:in `require'
    19: from /home/STATLER/jdc44/apps/ereqs/spec/spec_helper.rb:6:in `<top (required)>'
    18: from /home/STATLER/jdc44/apps/ereqs/spec/spec_helper.rb:6:in `require'
    17: from /home/STATLER/jdc44/apps/ereqs/config/environment.rb:5:in `<top (required)>'
    16: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/railtie.rb:193:in `method_missing'
    15: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/railtie.rb:193:in `public_send'
    14: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/application.rb:352:in `initialize!'
    13: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in `run_initializers'
    12: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
    11: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
    10: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
     9: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `call'
     8: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `each'
     7: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
     6: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
     5: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
     4: from /usr/local/rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
     3: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in `block in run_initializers'
     2: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `run'
     1: from /home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `instance_exec'

/home/STATLER/jdc44/apps/ereqs/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:105:in `block in <class:Railtie>': Expected to find a manifest file in `app/assets/config/manifest.js` (Sprockets::Railtie::ManifestNeededError)
But did not, please create this file and use it to link any assets that need
to be rendered by your app:

Example:
  //= link_tree ../images
  //= link_directory ../javascripts .js
  //= link_directory ../stylesheets .css
and restart your server

----------------------------

I do not think the manifest.js output is related, but left it in just in case it is a clue to anyone.

Lines 18 - 21 are files we wrote (not created by ruby/rails).
21: from /home/STATLER/jdc44/apps/ereqs/spec/controllers/admins/account_codes_controller_spec.rb:1:in `<top (required)>'
20: from /home/STATLER/jdc44/apps/ereqs/spec/controllers/admins/account_codes_controller_spec.rb:1:in `require'
19: from /home/STATLER/jdc44/apps/ereqs/spec/spec_helper.rb:6:in `<top (required)>'
18: from /home/STATLER/jdc44/apps/ereqs/spec/spec_helper.rb:6:in `require'


spec/controllers/admins/account_codes_controller_spec.rb (with line nbr)
  1 require 'spec_helper'


spec/spec_helper.rb (with line nbrs)
  1 require 'simplecov'                                                                                                                                    
  2 SimpleCov.start 'rails'                                                        
  3                                                                                
  4 # This file is copied to spec/ when you run 'rails generate rspec:install'     
  5 ENV["RAILS_ENV"] ||= 'test'                                                    
  6 require File.expand_path("../../config/environment", __FILE__)                 
  7 require 'rspec/rails'                                                          
  8 require 'capybara/rspec'                                                       
  9 require 'webmock/rspec'                                                        
 10 require 'statlerwire/spec_helpers'

----------------------------

I do not know of any log files that might contain any clues.  I've read many threads via Google, but did not find any with my actual topic.

Any help would be greatly appreciated.

JohnC

John Cowan

unread,
Apr 8, 2020, 5:52:00 PM4/8/20
to simp...@googlegroups.com
Thank you.
I ended up blowing away my Gemfile.lock and running bundle install again and that did the trick.  I think I must have ran a `bundle update` at one point and that updated the simplecov gem to the higher version.

Thank you for the input on the manifest.js error.  I did add the recommended file and that solved that issue.

Now, on to some feature specs that no longer pass.

Thanks again,

Cheers!
JohnC

--
You received this message because you are subscribed to the Google Groups "SimpleCov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simplecov+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/simplecov/b11f126a-c0b9-4509-8a8e-de705287cb74%40googlegroups.com.


--
John D Cowan
NY's #1 YankeeFan

607.591.5970

Reply all
Reply to author
Forward
0 new messages