Witam,
Mam kłopot z paperclip i tworzeniem miniaturki
To działa:
has_attached_file :images,
:url => "/assets/products/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/products/:id/:style/:basename.:extension"
to nie działa: Tutaj nawet formularz się nie zapisuję…
has_attached_file :images, :styles => { :small => "150x150>" },
:url => "/assets/products/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/products/:id/:style/:basename.:extension"
W logu mam taki błąd: (o ile go dobrze wyłapałem)
[code] Rendered /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.4ms)
Started GET “/assets/wall/1/medium/bg_wo_video_language.jpg” for 89.79.218.16 at 2012-11-29 14:35:08 +0100
Served asset /wall/1/medium/bg_wo_video_language.jpg - 404 Not Found (10ms)
ActionController::RoutingError (No route matches [GET] “/assets/wall/1/medium/bg_wo_video_language.jpg”):
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in
call’
railties (3.2.8) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.8) lib/rails/rack/logger.rb:16:in
call’
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in
call’
rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in
call’
rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in
call’
railties (3.2.8) lib/rails/engine.rb:479:in call' railties (3.2.8) lib/rails/application.rb:223:in
call’
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in method_missing' thin (1.5.0) lib/thin/connection.rb:81:in
block in pre_process’
thin (1.5.0) lib/thin/connection.rb:79:in catch' thin (1.5.0) lib/thin/connection.rb:79:in
pre_process’
thin (1.5.0) lib/thin/connection.rb:54:in process' thin (1.5.0) lib/thin/connection.rb:39:in
receive_data’
eventmachine (1.0.0) lib/eventmachine.rb:187:in run_machine' eventmachine (1.0.0) lib/eventmachine.rb:187:in
run’
thin (1.5.0) lib/thin/backends/base.rb:63:in start' thin (1.5.0) lib/thin/server.rb:159:in
start’
thin (1.5.0) lib/thin/controllers/controller.rb:86:in start' thin (1.5.0) lib/thin/runner.rb:187:in
run_command’
thin (1.5.0) lib/thin/runner.rb:152:in run!' thin (1.5.0) bin/thin:6:in
<top (required)>’
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/thin:23:in load' /usr/local/rvm/gems/ruby-1.9.3-p194/bin/thin:23:in
’
Rendered /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.2ms)
Started GET “/assets/wall/1/thumb/bg_wo_video_language.jpg” for 89.79.218.16 at 2012-11-29 14:35:08 +0100
Served asset /wall/1/thumb/bg_wo_video_language.jpg - 404 Not Found (10ms)
ActionController::RoutingError (No route matches [GET] “/assets/wall/1/thumb/bg_wo_video_language.jpg”):
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in
call’
railties (3.2.8) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.8) lib/rails/rack/logger.rb:16:in
call’
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in
call’
rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in
call’
rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in
call’
railties (3.2.8) lib/rails/engine.rb:479:in call' railties (3.2.8) lib/rails/application.rb:223:in
call’
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in method_missing' thin (1.5.0) lib/thin/connection.rb:81:in
block in pre_process’
thin (1.5.0) lib/thin/connection.rb:79:in catch' thin (1.5.0) lib/thin/connection.rb:79:in
pre_process’
thin (1.5.0) lib/thin/connection.rb:54:in process' thin (1.5.0) lib/thin/connection.rb:39:in
receive_data’
eventmachine (1.0.0) lib/eventmachine.rb:187:in run_machine' eventmachine (1.0.0) lib/eventmachine.rb:187:in
run’
thin (1.5.0) lib/thin/backends/base.rb:63:in start' thin (1.5.0) lib/thin/server.rb:159:in
start’
thin (1.5.0) lib/thin/controllers/controller.rb:86:in start' thin (1.5.0) lib/thin/runner.rb:187:in
run_command’
thin (1.5.0) lib/thin/runner.rb:152:in run!' thin (1.5.0) bin/thin:6:in
<top (required)>’
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/thin:23:in load' /usr/local/rvm/gems/ruby-1.9.3-p194/bin/thin:23:in
'[/code]
Jak tylko wywalę “:styles => { :small => “150x150>” },” to działał… no ale miniaturek nie robi.
Może ktoś coś podpowie.