我正在使用rails 4处理图片上传,但我遇到了问题,无法使其正常工作。
undefined method `remove_previously_stored_files_after_update' for #<ActionDispatch::Http::UploadedFile:0x0000000d3f7778>
有人可以帮我解决这个问题吗?
以下是完整跟踪:
carrierwave(0.10.0)lib / carrierwave / mount.rb:233:in make_lambda中的
store_previous_model_for_image' activesupport (4.2.3) lib/active_support/callbacks.rb:430:in
阻止&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:162:在call' activesupport (4.2.3) lib/active_support/callbacks.rb:162:in
块中 停止&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:502:incall' activesupport (4.2.3) lib/active_support/callbacks.rb:502:in
阻止通话&#39; activesupport(4.2.3) lib / active_support / callbacks.rb:502:在each' activesupport (4.2.3) lib/active_support/callbacks.rb:502:in
来电&#39; activesupport(4.2.3) lib / active_support / callbacks.rb:88:inrun_callbacks' activerecord (4.2.3) lib/active_record/callbacks.rb:310:in
_ update_record&#39; activerecord(4.2.3)lib / active_record / timestamp.rb:70:in_update_record' activerecord (4.2.3) lib/active_record/persistence.rb:504:in
create_or_update&#39; activerecord(4.2.3)lib / active_record / callbacks.rb:302:block in create_or_update' activesupport (4.2.3) lib/active_support/callbacks.rb:115:in
来电&#39; activesupport(4.2.3) lib / active_support / callbacks.rb:115:在call' activesupport (4.2.3) lib/active_support/callbacks.rb:553:in
块中(2级)编译&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:503:incall' activesupport (4.2.3) lib/active_support/callbacks.rb:503:in
call&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:88:inrun_callbacks' activerecord (4.2.3) lib/active_record/callbacks.rb:302:in
create_or_update&#39; ActiveRecord的 (4.2.3)lib / active_record / persistence.rb:120:在save' activerecord (4.2.3) lib/active_record/validations.rb:37:in
中保存&#39; ActiveRecord的 (4.2.3)lib / active_record / attribute_methods / dirty.rb:21:在save' activerecord (4.2.3) lib/active_record/transactions.rb:286:in
块中 (2级)保存&#39; activerecord(4.2.3) lib / active_record / transactions.rb:351:在block in with_transaction_returning_status' activerecord (4.2.3) lib/active_record/connection_adapters/abstract/database_statements.rb:211:in
交易&#39; activerecord(4.2.3) lib / active_record / transactions.rb:220:在transaction' activerecord (4.2.3) lib/active_record/transactions.rb:348:in
with_transaction_returning_status&#39; activerecord(4.2.3) lib / active_record / transactions.rb:286:inblock in save' activerecord (4.2.3) lib/active_record/transactions.rb:301:in
rollback_active_record_state!&#39; activerecord(4.2.3) lib / active_record / transactions.rb:285:在save' activerecord (4.2.3) lib/active_record/persistence.rb:252:in
块更新&#39; ActiveRecord的 (4.2.3)lib / active_record / transactions.rb:351:在事务中的block in with_transaction_returning_status' activerecord (4.2.3) lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
块中&#39; activerecord(4.2.3) LIB / active_record / connection_adapters /抽象/ transaction.rb:184:在within_new_transaction' activerecord (4.2.3) lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
交易&#39; activerecord(4.2.3) lib / active_record / transactions.rb:220:在transaction' activerecord (4.2.3) lib/active_record/transactions.rb:348:in
with_transaction_returning_status&#39; activerecord(4.2.3) lib / active_record / persistence.rb:250:update' app/controllers/front/ads_controller.rb:38:in
更新&#39; ActionPack的 (4.2.3)lib / action_controller / metal / implicit_render.rb:4:insend_action' actionpack (4.2.3) lib/abstract_controller/base.rb:198:in
process_action&#39; ActionPack的 (4.2.3)lib / action_controller / metal / rendering.rb:10:in 进程中的process_action' actionpack (4.2.3) lib/abstract_controller/callbacks.rb:20:in
阻止&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:115:在call' activesupport (4.2.3) lib/active_support/callbacks.rb:115:in
来电&#39; activesupport(4.2.3)lib / active_support / callbacks.rb:553:inblock (2 levels) in compile' activesupport (4.2.3) lib/active_support/callbacks.rb:503:in
call&#39; activesupport(4.2.3) lib / active_support / callbacks.rb:503:在call' activesupport (4.2.3) lib/active_support/callbacks.rb:88:in
run_callbacks&#39; ActionPack的 (4.2.3)lib / abstract_controller / callbacks.rb:19:在process_action' actionpack (4.2.3) lib/action_controller/metal/rescue.rb:29:in
process_action&#39; actionpack(4.2.3) lib / action_controller / metal / instrumentation.rb:32:在block in process_action' activesupport (4.2.3) lib/active_support/notifications.rb:164:in
块中的仪器&#39; activesupport(4.2.3) lib / active_support / notifications / instrumenter.rb:20:在instrument' activesupport (4.2.3) lib/active_support/notifications.rb:164:in
工具&#39; actionpack(4.2.3) lib / action_controller / metal / instrumentation.rb:30:在process_action' actionpack (4.2.3) lib/action_controller/metal/params_wrapper.rb:250:in
process_action&#39; activerecord(4.2.3) LIB / active_record / railties / controller_runtime.rb:18:在process_action' actionpack (4.2.3) lib/abstract_controller/base.rb:137:in
过程&#39; actionview(4.2.3) lib / action_view / rendering.rb:30:process' actionpack (4.2.3) lib/action_controller/metal.rb:196:in
发送&#39; actionpack(4.2.3) lib / action_controller / metal / rack_delegation.rb:13:在dispatch' actionpack (4.2.3) lib/action_controller/metal.rb:237:in
块中 动作&#39; actionpack(4.2.3) lib / action_dispatch / routing / route_set.rb:76:在call' actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:76:in
发送&#39; actionpack(4.2.3)lib / action_dispatch / routing / route_set.rb:45:inserve' actionpack (4.2.3) lib/action_dispatch/journey/router.rb:43:in
阻止服务&#39; actionpack(4.2.3) lib / action_dispatch / journey / router.rb:30:each' actionpack (4.2.3) lib/action_dispatch/journey/router.rb:30:in
发送&#39; actionpack(4.2.3) lib / action_dispatch / routing / route_set.rb:821:在call' rack (1.6.4) lib/rack/etag.rb:24:in
来电&#39;机架(1.6.4) lib / rack / conditionalget.rb:38:incall' rack (1.6.4) lib/rack/head.rb:13:in
来电&#39; actionpack(4.2.3) lib / action_dispatch / middleware / params_parser.rb:27:incall' actionpack (4.2.3) lib/action_dispatch/middleware/flash.rb:260:in
来电&#39; rack(1.6.4)lib / rack / session / abstract / id.rb:225:在context' rack (1.6.4) lib/rack/session/abstract/id.rb:220:in
电话&#39; ActionPack的 (4.2.3)lib / action_dispatch / middleware / cookies.rb:560:在call' activerecord (4.2.3) lib/active_record/query_cache.rb:36:in
电话&#39; activerecord(4.2.3) LIB / active_record / connection_adapters /抽象/ connection_pool.rb:653:在call' activerecord (4.2.3) lib/active_record/migration.rb:377:in
呼叫&#39; actionpack(4.2.3) lib / action_dispatch / middleware / callbacks.rb:29:在block in call' activesupport (4.2.3) lib/active_support/callbacks.rb:84:in
run_callbacks&#39; actionpack(4.2.3) lib / action_dispatch / middleware / callbacks.rb:27:call' actionpack (4.2.3) lib/action_dispatch/middleware/reloader.rb:73:in
来电&#39; actionpack(4.2.3)lib / action_dispatch / middleware / remote_ip.rb:78:incall' actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
呼叫&#39; web-console(2.2.1)lib / web_console / middleware.rb:39:incall' actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call&#39; railties(4.2.3)lib / rails / rack / logger.rb:38:incall_app' railties (4.2.3) lib/rails/rack/logger.rb:20:in
阻止电话&#39;的ActiveSupport (4.2.3)lib / active_support / tagged_logging.rb:68:在block in tagged' activesupport (4.2.3) lib/active_support/tagged_logging.rb:26:in
标记的&#39; activesupport(4.2.3) lib / active_support / tagged_logging.rb:68:intagged' railties (4.2.3) lib/rails/rack/logger.rb:20:in
来电&#39; actionpack(4.2.3) lib / action_dispatch / middleware / request_id.rb:21:incall' rack (1.6.4) lib/rack/methodoverride.rb:22:in
来电&#39;机架(1.6.4) lib / rack / runtime.rb:18:incall' activesupport (4.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in
call&#39; rack(1.6.4)lib / rack / lock.rb:17:incall' actionpack (4.2.3) lib/action_dispatch/middleware/static.rb:116:in
call&#39;机架(1.6.4) lib / rack / sendfile.rb:113:在call' railties (4.2.3) lib/rails/engine.rb:518:in
电话&#39;铁路(4.2.3) lib / rails / application.rb:165:call' rack (1.6.4) lib/rack/lock.rb:17:in
来电&#39;机架(1.6.4) lib / rack / content_length.rb:15:incall' rack (1.6.4) lib/rack/handler/webrick.rb:88:in
service&#39; C:/ruby/Ruby21-x64/lib/ruby/2.1.0/webrick/httpserver.rb:138:在service' C:/ruby/Ruby21-x64/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
运行&#39; C:/ruby/Ruby21-x64/lib/ruby/2.1.0/webrick/server.rb:295:在`block in start_thread&#39;
提前致谢