【发布时间】:2011-09-26 06:16:46
【问题描述】:
我在本地 WEBrick 服务器上使用 Ruby on Rails。
我正在从 url 生成一些网站图像,将它们写入我的本地文件系统并显示它们。我用它们的 url 命名图像,但将所有 \ 替换为 -。有些图像似乎没有加载,因为它在我的文件系统上找不到图像,并且我得到了损坏的图像图标。但是,当我检查我的文件系统时,我发现所有图像都在那里。
这是我在日志中遇到的错误:
Started GET "/images/image_site/http:--www.urbandictionary.com-define.php?term=slim%20shady.jpg?1309465379" for 127.0.0.1 at Thu Jun 30 13:23:06 -0700 2011
ActionController::RoutingError (No route matches "/images/image_site/http:--www.urbandictionary.com-define.php"):
这是我的html代码:
<img alt="Http:--www.urbandictionary.com-define.php?term=slim%20shady" class="site_image" src="/images/image_site/http:--www.urbandictionary.com-define.php?term=slim%20shady.jpg?1309465379">
发生了什么,我该如何解决?如果我需要提供更多信息,请告诉我。
【问题讨论】:
标签: ruby-on-rails ruby debugging file error-handling