現在、RailsのオリジナルアプリにBootstrapを導入したのですが、RspecにてActionController::RoutingError:No route matches [GET] "/custom.css"が発生し解決できず、困っております。
custom.cssというファイルは存在しておらず、Bootstrapを導入時に新規でcustom.scssを作成しております。
また、application.scssに*= require custom.cssを追記しても改善されませんでした。
何卒、よろしくお願いいたします。
エラーメッセージ
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_投稿を削除後、削除成功のフラッシュが表示されること_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";
回答1件
あなたの回答
tips
プレビュー