LoginSignup
1
1

More than 5 years have passed since last update.

featuresテストで画像にNo route matchesが出た場合

Posted at

結論

自分の場合は、単純にcss内の背景画像の指定が間違っていた(image-url指定していなかった)

エラー文

Failures:

  1) Titles display correct content pc display correct content
     Failure/Error: Unable to find matching line from backtrace
     ActionController::RoutingError:
       No route matches [GET] "/img/common/icn-favorite-star2.png"

取り敢えずtest.log

assets 指定されてない…ということは…?

test.log
...
Started GET "/assets/common/gu/icon-gn-header.png" for 127.0.0.1 at 2014-11-29 20:58:48 +0900
Started GET "/img/common/icn-favorite-star2.png" for 127.0.0.1 at 2014-11-29 20:58:48 +0900
Started GET "/assets/recipe/article-social-logo.png" for 127.0.0.1 at 2014-11-29 20:58:48 +0900
...

案の定 image-url 漏れでした、、

background: url(../img/common/icn-favorite-star2.png)  no-repeat -12px 0;
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1