2
1

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 5 years have passed since last update.

Herokuでデプロイしても画像が表示されなかった場合の対処法

Posted at

1 はじめに

RubyonRailsで作成しているアプリでHerokuにデプロイしてもトップページ用の画像が表示されず少し時間を取られたので備忘録として残します。

2 対処法

config ファイルを書きかえたら表示されるようになります!

単純でした...

config/environments/production.rb
config.assets.compile = false

config/environments/production.rbファイルの
config.assets.compile = false を...

config/environments/production.rb
config.assets.compile = true

trueに変えるだけですね。

最初原因が分からず何度もpushして確かめていました...

以上、お役に立てれば幸いです。

2
1
1

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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?