ユーザーにアバターを追加するために Rails 3.0 アプリで Paperclip を使用していますが、パスがオフになっているため画像が保存されません。私が得るものは次のとおりです。
2012-04-11 23:38:29 -0700 で 127.0.0.1 の GET "/profilepics/small/missing.png" を開始しました
ActionController::RoutingError (「/profilepics/small/missing.png」に一致するルートがありません):
私のユーザーモデルには次のものがあります:
has_attached_file :profilepic, :styles => { :small => "150x150>" }
:path => & :url => には何を入れればよいですか?
フォームは次のようになります。
<% form_for @user, :html => { :multipart => true } do |f| %>
<%= f.file_field :profilepic %>
<% end %>
ログは次のようになります。
2012-04-12 00:33:51 -0700 に 127.0.0.1 の GET "/system/profilepics/small/missing.png" を開始しました
ActionController::RoutingError ("/system/profilepics/small/missing.png" に一致するルートがありません):
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.0.12/lib/action_dispatch/middleware/templates/rescues/routing_error.erb をレスキュー/レイアウト内でレンダリング (1.2ms)