#67 10/5 userに画像をアップロードする
RailsTutorialにCarrierWaveを用いた、画像アップロード方法を用いる
rails g uploader image
User.rbに、
mount_uploader :image, ImageUploader
■様々なS3とIAMのエラーは以下リンクに解決法書いてある
https://qiita.com/_ayk_study/items/f3c84050e94135e84014
・heroku logsでのエラー
The AWS Access Key Id you provided does not exist in our records
→アクセスキー変えた
SignatureDoesNotMatch<
シークレットキーはローカル(Mac)のFouryフォルダに保存 で、まだエラー
・Client Request Interrupted
・Excon::Error::Forbidden (Expected(200) <=> Actual(403 Forbidden)
・SignatureDoesNotMatch やっぱり
これ用のIAMユーザーでログインしていないからダメだった
・次のエラー パケットポリシーの変更
<>はいらないよ!!
Access Deniedだったものが、解決!
ただ、表示画面でエラーが起きる
以下@userをuserとしていたため、templateエラー
<td><%= image_tag @user.image.to_s %></td>
これでOK!