0
0

More than 3 years have passed since last update.

画像投稿機能実装時のNil location provided. Can't build URIエラー対処

Last updated at Posted at 2020-03-25

環境

・Rails 5.2.4.1
・gem 'carrierwave'
・gem 'rmagick'

エラー

ArgumentError
Nil location provided. Can't build URI

この様なエラー表示されました。
スクショ撮るのを忘れました(汗)

色々とググった結果、、
画像投稿機能を実装前にテスト投稿したものに画像が含まれたいないため
エラーとなっている模様

解決方法

すでに投稿しているもので画像が含まれていないものを削除
今回は全てを削除。

rails c
Post.destroy_all

これで解決できました!

参考サイト
https://simpledancer.hatenablog.com/entry/2019/05/19/Nil_location_provided__Can't_build_URI%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%8C%E5%87%BA%E3%81%9F%E6%99%82%E3%81%AB%E3%82%84%E3%81%A3%E3%81%9F%E3%81%93%E3%81%A8

0
0
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
0
0