Syntax error, unexpected keyword_ensure

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 %>

  • <%=h att.didascalia %>, <%=h att.nomeoriginale%>    <% form_tag :controller => 'attachments', :action => 'download' %> <% hidden_field_tag 'path_to_file', :value => pathFile %> <%= submit_tag 'SCARICA', :id => "search-submit-attach" %> <% end %>     <%= link_to image_tag("delete.gif", :border=>0), att, :confirm => 'Sicuri ?', :method => :delete %>
  • <% end %>

    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:incompile!’
    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:inrender’
    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:inblock 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:inrealtime’
    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:inbenchmark’
    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:inrender_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:inrender_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:inwith_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:inrender_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:inrender_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:inblock 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:inrealtime’
    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:inrender_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:incall’
    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:ineach’
    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:inrespond_to’
    F:/rubyProjects/fg/app/controllers/resources_controller.rb:16:in show' F:/rubyProjects/fg/vendor/rails/actionpack/lib/action_controller/base.rb:1331:inperform_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:inperform_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:inblock 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:inms’
    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:inperform_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:inprocess’
    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:inprocess’
    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:incall’

    Dove sbaglio ?

    Grazieeeeeee

    On Monday 09 August 2010 12:10:31 An Car wrote:

    Ciao a tutti,
    mi farebbe assai comodo capire dove sta l’errore:

    Penso che manchi il do:
    <% form_tag :controller => ‘attachments’, :action => ‘download’ do%>

    ciao
    Flavio

    Infatti, dopo la tua segnalazione l’ho messo, e… funziona.
    Grazie mille

    Flavio C. wrote:

    On Monday 09 August 2010 12:10:31 An Car wrote:

    Ciao a tutti,
    mi farebbe assai comodo capire dove sta l’errore:

    Penso che manchi il do:
    <% form_tag :controller => ‘attachments’, :action => ‘download’ do%>

    ciao
    Flavio

    This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

    | Privacy Policy | Terms of Service | Remote Ruby Jobs