Home>

Currently, I have introduced Bootstrap to the original Rails app, but I am having trouble solving it because ActionController :: RoutingError: No route matches [GET] "/custom.css" occurs in Rspec.

There is no file called custom.css, and custom.scss is newly created when Bootstrap is installed.

Also, adding * = require custom.css to application.scss did not improve it.

Thanks for your cooperation.

Error message

Failure/Error: raise ActionController :: RoutingError, "No route matches [# {env ['REQUEST_METHOD']}] # {env ['PATH_INFO']. Inspect}"
     ActionController :: RoutingError:
       No route matches [GET] "/custom.css"
     [Screenshot]: /Users/hogehoge/Portfolio/connect/tmp/screenshots/failures_r_spec_example_groups_static_pages_top_nested_ After deleting a post, a flash of successful deletion is displayed_9.png
 # /Users/hogehoge/Portfolio/connect/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:36:in `call'
     # /Users/hogehoge/Portfolio/connect/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
Showing full backtrace because every line was filtered out.
     # See docs for RSpec :: Configuration # backtrace_exclusion_patterns and
     # RSpec :: Configuration # backtrace_inclusion_patterns for more information.
     # ------------------
     # --- Caused by: ---
     # Capybara :: CapybaraError:
     # Your application server raised an error --It has been raised in your test code because Capybara.raise_server_errors == true
     # ./spec/support/test_helper.rb:13:in `login_for_system'


application.scss

/ *
* require_tree.
* require_self
* = require animate.css
* = require icomoon.css
* = require bootstrap.css
* = require flexslider.css
* = require style.css
* = require magnific-popup.css
* /
@import "style.scss";
@import "bootstrap-sprockets";
@import "bootstrap.scss";
@import "custom.scss";
@import "icomoon/style";