新手问题 <%=image_tag 升级到 rails 5.2.1 后报错,原来 5.1.2 没有问题。求解决

zxm9988 · 2018年10月18日 · 最后由 zxm9988 回复于 2018年10月18日 · 844 次阅读

CarrierWave with Rails 5.2 ActiveStorage may have some issues. You could try to change your classic image_tag.

Assuming you're using something like this :

%= image_tag(@user.image) %>

Change it to something like this, using .url

<%= image_tag(@user.image.url) %>

https://stackoverflow.com/questions/50307547/carrierwave-for-image-upload-with-ruby-on-rails

zxm9988 关闭了讨论。 10月18日 18:15
需要 登录 后方可回复, 如果你还没有账号请 注册新账号