Rails image 路径的不正确的问题?

dingjop · October 16, 2012 · Last by dingjop replied at October 17, 2012 · 2367 hits

在跟着书做例子时,在根目录 public 下的 images 文件夹里有 ruby.jpg,在页面表单里输入的是 public/images/ruby.jpg,显示时图片的地址前面多了个 assets,指定到 assets 目录下去了

Ruby

怎样去找根目录下 public 里的?

<%=image_tag '/images/ruby.jpg'%>

@ywencn 可以了,是不是默认到 public 中去找文件,目录错了时,程序会再到 assets 目录去找

@sevntech 看过了,关于部署的那块没看懂。

You need to Sign in before reply, if you don't have an account, please Sign up first.