Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

javascript - 活动存储500(内部服务器错误)图像不显示(Active storage 500 (Internal Server Error) The images don't show)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...