我的問題是,我跟着這個tutorial嘗試與水豚方法save_and_open_page
調試時加載資產在測試環境中,但我得到了以下錯誤:Rails的5豚測試路由錯誤公共/資產
No route matches [GET] "/public/assets/application-22cc3ed14274a8cdae6670ce999946a627b5fd03c71819fbe4453118dca5ff40.css">
我在environments/test.rb
中添加了以下參數以嘗試使它們正常工作,但仍然出現此錯誤。
config.assets.digest = true
config.assets.prefix = '../public/assets/'
config.assets.quiet = true
config.assets.precompile += %w(*.js *.css)
config.public_file_server.enabled = true
感謝您的幫助!
檢查,如果這有助於:https://stackoverflow.com/a/40441986/1033737 – fabersky
我嘗試過,但不起作用。我也嘗試安裝紗線,但也沒有幫助。 –
你在水豚使用什麼驅動程序? –