Ciao a tutti,
mi farebbe assai comodo capire dove sta l’errore:
in una mia view ho impostato questo codice:
<% @atts.each do |att| %>
<% pathFile = Attachment::EXTENDEDPATH + att.idext.to_s %><%
att.categoria %><% att.nome %>_<% att.nomeoriginale %>
ma vengo bastonato:
SyntaxError in Resources#show
Showing app/views/shared/_mostrattach.html.erb where line #11 raised:
F:/rubyProjects/fg/app/views/shared/_mostrattach.html.erb:11: syntax
error, unexpected keyword_ensure, expecting $end
Extracted source (around line #11):
8: <%= link_to image_tag(“delete.gif”, :border=>0),
att, :confirm => ‘Sicuri ?’, :method => :delete %>
9: <% end %>
10:
Trace of template inclusion: app/views/shared/_mostrattach.html.erb,
app/views/resources/show.html.erb
RAILS_ROOT: F:/rubyProjects/fg
Application Trace | Framework Trace | Full Trace
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:91:in
module_eval' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:91:in
compile!’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:61:in
compile' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:28:in
render’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:20:in
block in render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:26:in
block in 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:26:in
benchmark’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:19:in
render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/template.rb:205:in
render_template’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:44:in
render_partial' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/partials.rb:184:in
render_partial’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/base.rb:267:in
render' F:/rubyProjects/fg/app/views/resources/show.html.erb:20:in
_run_erb_app47views47resources47show46html46erb’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in
block in render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/base.rb:306:in
with_template’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/renderable.rb:30:in
render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/template.rb:205:in
render_template’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/base.rb:265:in
render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/base.rb:348:in
_render_with_layout’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_view/base.rb:262:in
render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:1250:in
render_for_file’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:942:in
render' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in
block in render_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:51:in
render_with_benchmark’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:135:in
block in custom' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:179:in
call’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:179:in
block in respond' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:173:in
each’
F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:173:in
respond' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:107:in
respond_to’
F:/rubyProjects/fg/app/controllers/resources_controller.rb:16:in show' 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’
Dove sbaglio ?
Grazieeeeeee