14
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

The asset "" is not present in the asset pipeline

Posted at

assetへのパイプラインがうまくいってない時に起こるエラーです。

config/envitonments/production.rbで

config.assets.compile = true

をして、再起動してとりあえずうまく行かない時は、

<%= image_tag user.image.to_s %>

みたいな記述をしていませんか。
特にbxsliderをお使いの初学者の方。
このままだとただの変数を入れているだけになるので
そういう場合は、

<%= image_tag '/assets/user.jpg' %>

みたいに「app/assets/images」ディレクトリに置いて呼び出すか。
refireのgemを使って呼び出せばうまく行きます。

<%= f.attachment_field :image %>
14
10
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
14
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?