Controller error message: "ActionView :: Template :: Error: Asset 'MyString' is missing from the asset pipeline"

This is the verification code that fails:

  test "should get index" do
    get products_url
    assert_response :success
  end

      

The error information is ActionView :: Template :: Error: the asset "MyString" is missing from the asset pipeline.

WTF?

+3


source to share


2 answers


you have to make sure the images in the fixtures exist. look here



+1


source


Moved into the same problem but found a simple solution. First I fixed in /test/fixtures/products.yml

one:
  title: MyString
  description: MyText
  image_url: lorem.jpg
  price: 9.99

two:
  title: MyString
  description: MyText
  image_url: lorem.jpg
  price: 9.99

      



Finally, I actually added an image called "lorem.jpg" to my assets / images . I found it confusing since they don't mention it at all in the book, but hopefully this little arrow gets you back on track.

+1


source







All Articles