I have a problem with the active storage using the S3.
(我对使用S3的活动存储有问题。)
It was working well, but after I restarted my mac, the images won't show anymore.
(它运行良好,但是重新启动Mac之后,图像将不再显示。)
When I look at the inspect, the images are there, but don't show as a image.
(当我查看检查时,图像在那里,但不显示为图像。)
I didn't change any codes so I can't understand what is going now.
(我没有更改任何代码,所以我不明白现在发生了什么。)
It was working so the codes for active storage are correct as I think.
(它正在工作,所以我认为主动存储的代码是正确的。)
If somebody knows whats the reason please help me up.
(如果有人知道是什么原因,请帮助我。)
Thank you.
(谢谢。)
4 GET http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--df286b6aaa163709e038eff0cc421d80ca63ebad/jinmenusagi.jpeg 500 (Internal Server Error)
GET http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBGQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--70e13d9eed94047a61ef99ce1e4bf0986d52a541/images.jpeg 500 (Internal Server Error)
GET http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--50685975ef6c0e797b827fd56329fe398c31fb00/datingapp3.jpeg 500 (Internal Server Error)
don't know if this is the reason but there is this kind of 500 error.
(不知道这是不是原因,但是有这种500错误。)
when I try to update the users image from devise I get the following error.But I think that this isn't the problem.
(当我尝试通过设计更新用户图像时,出现以下错误。但是我认为这不是问题。)
NoMethodError in Devise::RegistrationsController#update
undefined method `upload' for nil:NilClass
also, this is the log from my terminal when I reload my page, where my images are showing.
(同样,这是我在重新加载页面时显示我的图像的终端日志。)
probably meaning my, url_for but not sure.
(可能意思是我的url_for,但不确定。)
NoMethodError (undefined method `url' for nil:NilClass):<br><br>
this is how I'm using the url_for ,which was doing well untill I restarted my mac.
(这就是我使用url_for的方式,直到重新启动Mac之前,它一直运行良好。)
<% @users.each_with_index do |user, i| %>
<li class="slide <%= "showing" if i == 0 %>" data-id="<%= user.id %>">
<div class="image-background" style="background-image: url('<%= url_for user.images.first %>')">
</div>
<div class="user-details">
<span class="user-name"><%= user.first_name %></span>,22
<br />
<i class="fas fa-music mr-3"></i>Music
<br>
<i class="fa fa-map-marker mr-3"></i>Place
</div>
</li>
<% end %>
ask by sinzanmono46 translate from so