javascript - Rails script tag syntax error? -


running rails app on new host , upgraded ruby v2.0.0 1.9.3, , i'm getting weird syntax error. looks this:

completed 500 internal server error in 178ms                                                                                                                                actionview::template::error (/home/action/braindb/app/views/folders/_contents.html.erb:124: syntax error, unexpected keyword_ensure, expecting end-of-input):              121:                                                                                                                                                                   122:        </script>                                                                                                                                                  app/views/folders/show.js.erb:1:in ` _app_views_folders_show_js_erb__1073772573694008441_69985052296980'                                                                  app/controllers/folders_controller.rb:34:in `show' 

i'm not sure what's wrong <script> tags, i'll paste file (_contents.html.erb) here:

    <div id="panel-container">     <div id="entry-container" class="entry-window">         <div id="meta-bar" class="top">             <span id="location-span" style="position:relative; float:left;">in <%= @folder.title %></span>             <div id="entry-meta" class="meta-info">                 <i class="icon-remove icons top-icons" id="close"></i>                 <i class="icon-ok icons top-icons" id="save-entry"></i>             </div>         </div>         <div id="entry-create-partial" class="contain-entry">             <div id="title-create-partial" class="title-partial" name="title" contenteditable="true" data-placeholder='title it' style="color:black"></div>             <div id="content-create-partial" class="content-partial" name="content" contenteditable="true" data-placeholder='write anything' style="color:gray"></div>         </div>     </div>      <div id="right-panel" class="resize">         <div id="top" class="top">             <div id="folder-left">                 <h3><%= @folder.title %></h3>                 <% if @folder.children.count + @folder.submissions.count == 0 %>                   empty! add journals & entries               <% else %>                   <%= @folder.children.count %> journals & <%= @folder.submissions.count %> entries               <% end %>             </div>             <% end %>             <ul id="inner-list">                 <button class="btn" id="journal-create-button">new journal</button>                 <div id="create-journal-drop">                     <form action="/folders" method="post">                         <%= hidden_field_tag :user_id, current_user.id %>                          <%= hidden_field_tag :parent_id, @folder.id %>                         <h3 id="journal-create-partial">new sub-journal</h3>                         <input type="text" id="titleinput" name="title" placeholder="title it">                         <button type="submit" class="md-close folder-create" id="folder-create">create</button>         </form>                 </div>                 <button class="btn" id="entry-button">new entry</button>     </ul>         </div>         <% if @folder.submissions.count > 0 %>         <svg id="submission-circles">             <circle></circle>             <circle></circle>             <circle></circle>             <circle></circle>         </svg>         <% else %>         <h2>it's quiet in here. create journal entry or sub-journal started!</h2>         <% end %>     </div> 

<script type="text/javascript">      d3json = function(){         d3.json("/folders/<%= @folder.id %>.json", function(error, data) {              var circle;              var svg = d3.select("body").selectall("svg");              circle = svg.selectall("circle")             .data(data.submissions, array);                circle.enter().append("svg:a")             .attr("xlink:href", function(d){                 return "#";             })             .append("circle")             .style("fill", "#c0392b")             .attr("id", function(d){ return d.id; })             .attr("data-name", function(d){ return d.title; })             .on("click", function(d) {                 if (d.children !== null) {                     console.log(d.children);                     $.get("/parent_submissions/", {submission: d.id}, null, "script");                 }else{                     $.get("/new_submission/", {submission: d.id}, null, "script");                 }              })             .attr("cy", 90)             .attr("class", "floating")             .attr("cx", function(d){                 return (d.content.length / 2) * 10 + "px";             })             .attr("r", 50);              $("svg circle").tipsy({                 gravity: 'w',                 html: true,                 title: function() {                     var d = $(this).closest("svg circle").attr("data-name");                     return d;                 }             });              circle.exit().remove();          });     };     entryajax = function(){          $("#save-entry").click(function(){             $.ajax({                 type: "post",                 url: "/submissions",                 datatype: "json",                 data: {title: $("#title-create-partial").text(), content: $("#content-create-partial").text(), folder_id: <%= @folder.id %>},                 complete: function(){                     $.get("/ajax_load_events/", {folder: <%= @folder.id %>}, null, "script");                 }             });         });       };  </script> 

right these javascripts @ bottom of _contents.html.erb file.

right after close de div#folder-left , before ul#inner-list have <% end %> can't find block starting him...

i missed or missed something?


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -