Eccomi di nuovo qui…
sembra che tutto giri quando mi inchiodo con un “can’t dup symbols”…
ho cercato su google l’errore ma c’è una sola segnalazione e non sembra
fare al caso mio.
Disastro…
Se qualcuno mi dà una mano…grazie in anticipo
#controller
def download
send_file(params[:path_to_file], :disposition => :attachment)
end
#view
<% @atts.each do |att| %>
<% uscore = “_”
pathFile = “#{Attachment::EXTENDEDPATH
}#{att.idext.to_s}#{uscore}#{att.categoria}#{uscore}#{att.nome}#{uscore}#{att.nomeoriginale}”%>
errore
TypeError in AttachmentsController#download
can’t dup Symbol
RAILS_ROOT: F:/rubyProjects/fg
Application Trace | Framework Trace | Full Trace
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
dup' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
send_file_headers!’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:84:in
send_file' F:/rubyProjects/fg/app/controllers/attachments_controller.rb:37:in
download’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in
perform_action' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
call_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
perform_action_with_filters' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
block in perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
block in ms' C:/Ruby191/lib/ruby/1.9.1/benchmark.rb:309:in
realtime’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
ms' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
perform_action_with_rescue' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/flash.rb:151:in
perform_action_with_flash’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:532:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
process_with_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:391:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:386:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:438:in
`call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
dup' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
send_file_headers!’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:84:in
send_file' F:/rubyProjects/fg/app/controllers/attachments_controller.rb:37:in
download’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in
perform_action' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
call_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
perform_action_with_filters' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
block in perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
block in ms' C:/Ruby191/lib/ruby/1.9.1/benchmark.rb:309:in
realtime’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
ms' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
perform_action_with_rescue' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/flash.rb:151:in
perform_action_with_flash’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:532:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
process_with_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:391:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:386:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:438:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in
dispatch’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in
_call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in
block in build_middleware_stack’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
call' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
block in call’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
cache' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
cache’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in
call' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in
call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/head.rb:9:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:99:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lock.rb:11:in
block in call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lock.rb:11:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in
block in call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in
run’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in
call' F:/rubyProjects/fg/vendor/rails/railties/lib/rails/rack/static.rb:31:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in
block in call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
each’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
call' F:/rubyProjects/fg/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in
service’
C:/Ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:111:in service' C:/Ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:70:in
run’
C:/Ruby191/lib/ruby/1.9.1/webrick/server.rb:183:in `block in
start_thread’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
dup' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:154:in
send_file_headers!’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/streaming.rb:84:in
send_file' F:/rubyProjects/fg/app/controllers/attachments_controller.rb:37:in
download’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in
perform_action' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
call_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
perform_action_with_filters' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
block in perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
block in ms' C:/Ruby191/lib/ruby/1.9.1/benchmark.rb:309:in
realtime’
F:/rubyProjects/fg/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
ms' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
perform_action_with_benchmark’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
perform_action_with_rescue' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/flash.rb:151:in
perform_action_with_flash’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:532:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
process_with_filters’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:391:in
process' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:386:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:438:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in
dispatch’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in
_call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in
block in build_middleware_stack’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
call' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
block in call’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
cache' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
cache’
F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in
call' F:/rubyProjects/fg/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in
call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/head.rb:9:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:99:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lock.rb:11:in
block in call' <internal:prelude>:8:in
synchronize’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/lock.rb:11:in
call' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in
block in call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in
run' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in
call’
F:/rubyProjects/fg/vendor/rails/railties/lib/rails/rack/static.rb:31:in
call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in
block in call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
each' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
call’
F:/rubyProjects/fg/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in
call' C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
call’
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in
service' C:/Ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:111:in
service’
C:/Ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:70:in run' C:/Ruby191/lib/ruby/1.9.1/webrick/server.rb:183:in
block in
start_thread’
Request
Parameters:
{“authenticity_token”=>“yWBu7XdV55PJDz6gNV5WEj90bCbOFvrNMAf034gMLNw=”,
“path_to_file”=>“F:/rubyProjects/fg/public/uploads/5_1_1281281804_filmDaScaricare.txt”,
“commit”=>“SCARICA”}