システムでPaperclipとImageMagickを正常にセットアップしました。ファイルは正しくアップロードされ、サイズが変更され、適切なフォルダーに保存されています。
私は自分のビューにそれらの画像を表示しようとしています:
<%= image_tag @customer.logo.url(:medium) %>
画像は表示されません。画像の直接URLにアクセスすると、次のようになります。
Routing Error
No route matches "/images/assets/logos/1/medium/corplogo.jpg" with {:method=>:get}
これは、まだ開発中であり、Windowsで実行されているローカルサーバーです。私のフォームはマルチパートです:
<% form_for @customer, :url => {:action => "update", :id => @customer}, :html => {:multipart => true, :id => "myform"} do |f| %>
------開発サーバー------
ApplicationController#indexの処理(2010-09-27 04:38:33の127.0.0.1の場合)[G ET]パラメーター:{"1285570273" => nil}
ActionController :: RoutingError( "/images/assets/logos/1/medium/corplogo.jpg"と{:method =>:get}に一致するルートはありません):haml(3.0.15)rails /./ lib / sass / plugin /rack.rb:41:in `call '
レスキュー/レイアウトのレンダリング(not_found)
- - - モデル - - -
has_attached_file :logo,
:url => "assets/logos/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/logos/:id/:style/:basename.:extension",
:styles => {:medium => "300x300>", :thumb => "100x100>" }