Note that there are some explanatory texts on larger screens.

plurals
  1. PORails syntax error following RoR tutorial
    primarykey
    data
    text
    <p>I'm currently getting the following error in my rails app: syntax error, unexpected tCONSTANT, expecting keyword_end. The error and full code is below along with code from the user_controller#show. Also there is no ruby code in the properties partial.</p> <p>Any help would be great.</p> <p>Thanks, Tony.</p> <pre><code># User Controller def show @user = User.find(params[:id]) @properties = @user.properties end Section of code where error is occurring &lt;table border="0" class="gt-table gt-user-table"&gt; &lt;tbody&gt; &lt;% if @user.properties.any? %&gt; &lt;%= render @properties %&gt; &lt;% end %&gt; &lt;/tbody&gt; </code></pre> <p>The full page of code is:</p> <pre><code>&lt;% provide(:title, @user.name) %&gt; </code></pre> <p> </p> <pre><code> &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt; &lt;meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /&gt; &lt;meta http-equiv="Pragma" content="no-cache" /&gt; &lt;%= stylesheet_link_tag 'reset-fonts' %&gt; &lt;%= stylesheet_link_tag 'gt-styles' %&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- head --&gt; &lt;div class="gt-hd clearfix"&gt; &lt;!-- leaf watermark --&gt; &lt;div class="gt-leaf-watermark clearfix"&gt; &lt;!-- head top --&gt; &lt;div class="gt-hd-top clearfix"&gt; &lt;div class="gt-fixed-wrap clearfix"&gt; &lt;!-- logo --&gt; &lt;div class="gt-logo"&gt; Propertygate &lt;/div&gt; &lt;!-- / logo --&gt; &lt;!-- utility box --&gt; &lt;% if signed_in? %&gt; &lt;div class="gt-util-box"&gt; &lt;div class="gt-util-box-inner"&gt; &lt;p&gt;welcome &lt;strong&gt;&lt;%= current_user.name %&gt;&lt;/strong&gt; &lt;span class="gt-util-separator"&gt;|&lt;/span&gt; &lt;%= link_to "Sign out", signout_path, method: "delete" %&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;% else %&gt; &lt;%= link_to "Sign in", signin_path %&gt; &lt;% end %&gt; &lt;!-- / utility box --&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /head top --&gt; &lt;!-- navbar --&gt; &lt;div class="gt-navbar clearfix"&gt; &lt;div class="gt-fixed-wrap clearfix"&gt; &lt;!-- navigation --&gt; &lt;div class="gt-nav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="base.html"&gt;Base HTML&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="gt-active" href="tables.html"&gt;Tables&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="forms.html"&gt;Forms&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="text-styles.html"&gt;Text Styles&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="buttons.html"&gt;Buttons&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="login.html"&gt;Login&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- / navigation --&gt; &lt;!-- search --&gt; &lt;div class="gt-search"&gt;&lt;div class="gt-search-inner"&gt; &lt;input type="text" class="gt-search-text" value="Search" onfocus="javascript:if(this.value=='Search')this.value='';" onblur="javascript:if(this.value=='')this.value='Search';" /&gt; &lt;/div&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /navbar --&gt; &lt;/div&gt;&lt;!-- /leaf watermark --&gt; &lt;/div&gt; &lt;!-- / head --&gt; &lt;!-- body --&gt; &lt;div class="gt-bd gt-cols clearfix"&gt; &lt;% flash.each do |key, value| %&gt; &lt;div class="status success"&gt; &lt;p class="closestatus"&gt;&lt;a href="" title="Close"&gt;x&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;%= image_tag 'icons/icon_success.png', :alt =&gt; 'Success' %&gt;&lt;span&gt;&lt;%= key %&gt;&lt;/span&gt; &lt;%= value %&gt;&lt;/p&gt; &lt;/div&gt; &lt;% end %&gt; &lt;!-- main content --&gt; &lt;div class="gt-content"&gt; &lt;!-- User List Table --&gt; &lt;!-- This table can be used for listing things like users --&gt; &lt;h2 class="gt-table-head"&gt;Your Profile&lt;/h2&gt; &lt;!-- Content Box --&gt; &lt;div class="gt-content-box"&gt; &lt;table border="0" class="gt-table gt-user-table"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="gt-avatar"&gt;&lt;%= image_tag 'gt/avatar.gif', :alt =&gt; 'avatar' %&gt;&lt;/td&gt; &lt;td&gt; &lt;h4&gt;&lt;%= @user.name %&gt;&lt;/h4&gt; &lt;p&gt;My favorite color is green. I really like trees!&lt;/p&gt; &lt;p class="gt-table-edit"&gt;&lt;%= link_to 'Edit', edit_user_path(@user) %&gt;&lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;!-- Categories Sub Table --&gt; &lt;table border="0" class="gt-table-categories"&gt; &lt;tr&gt; &lt;th&gt;Email:&lt;/th&gt; &lt;td&gt;&lt;%= @user.email %&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;Friends:&lt;/th&gt; &lt;td&gt;&lt;a href=""&gt;Susan&lt;/a&gt;, &lt;a href=""&gt;Fred&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;&lt;!-- /Content Box --&gt; &lt;!-- / User List --&gt; &lt;br /&gt; &lt;!-- Article List Table --&gt; &lt;!-- This table can be used for listing things like articles, pages or blog entries --&gt; &lt;h2 class="gt-table-head"&gt;Current Articles&lt;/h2&gt; &lt;!-- Content Box --&gt; &lt;div class="gt-content-box"&gt; &lt;!-- Table Controls --&gt; &lt;div class="gt-table-controls clearfix"&gt; &lt;form action="" class="gt-table-picker"&gt; &lt;select&gt; &lt;option&gt;Choose Section...&lt;/option&gt; &lt;option&gt;Blog&lt;/option&gt; &lt;option&gt;Contact&lt;/option&gt; &lt;option&gt;About&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; &lt;p class="gt-table-pager"&gt;&lt;a class="current" href=""&gt;1&lt;/a&gt; | &lt;a href=""&gt;2&lt;/a&gt; | &lt;a href=""&gt;3&lt;/a&gt; &lt;a href=""&gt;&amp;raquo;&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- /Table Controls --&gt; &lt;table border="0" class="gt-table gt-user-table"&gt; &lt;tbody&gt; &lt;% if @user.properties.any? %&gt; &lt;%= render @properties %&gt; &lt;% end %&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;&lt;!-- /Content Box --&gt; &lt;div class="gt-table-buttons"&gt; &lt;a href="" class="gt-btn-blue-large"&gt;Add New Article&lt;/a&gt; &lt;/div&gt; &lt;!-- / Article Table List --&gt; &lt;/div&gt; &lt;!-- / main content --&gt; &lt;!-- sidebar --&gt; &lt;div class="gt-sidebar"&gt; &lt;!-- Sidebar Navigation --&gt; &lt;div class="gt-sidebar-nav gt-sidebar-nav-blue"&gt; &lt;h3&gt;Quick Links&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=""&gt;Add a New Post&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Edit User Settings&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;View Live Site&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- /Sidebar Navigation --&gt; &lt;!-- Sidebar Box --&gt; &lt;div class="gt-sidebar-box gt-sidebar-box-gray"&gt; &lt;!-- search --&gt; &lt;div class="gt-search"&gt;&lt;div class="gt-search-inner"&gt; &lt;input type="text" class="gt-search-text" value="Find an Article" onfocus="javascript:if(this.value=='Find an Article')this.value='';" onblur="javascript:if(this.value=='')this.value='Find an Article';" /&gt; &lt;/div&gt;&lt;/div&gt;&lt;!-- /search --&gt; &lt;/div&gt;&lt;!-- /Sidebar Box --&gt; &lt;!-- Sidebar Navigation --&gt; &lt;div class="gt-sidebar-nav gt-sidebar-nav-gray"&gt; &lt;h3&gt;Get Help&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="mailto:help@gooeytemplates.com"&gt;Email Us&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- /Sidebar Navigation --&gt; &lt;!-- Sidebar Content --&gt; &lt;div class="gt-sidebar-content"&gt; &lt;h3&gt;Sidebar Note&lt;/h3&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt; &lt;/div&gt;&lt;!-- /Sidebar Content --&gt; &lt;!-- Sidebar List --&gt; &lt;div class="gt-sidebar-list"&gt; &lt;h3&gt;Users List&lt;/h3&gt; &lt;ul class="gt-sidebar-list-content"&gt; &lt;li class="gt-sidebar-list-row"&gt; &lt;img class="gt-avatar-small" src="images/gt/avatar-small.gif" alt="avatar-small" width="25" height="25"/&gt; &lt;h4&gt;&lt;a href=""&gt;John Marker&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;I love to color pictures!&lt;/p&gt; &lt;/li&gt; &lt;li class="gt-sidebar-list-row"&gt; &lt;img class="gt-avatar-small" src="images/gt/avatar-small.gif" alt="avatar-small" width="25" height="25"/&gt; &lt;h4&gt;&lt;a href=""&gt;Charlee Watts&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;Eco-friendly is the way to go!&lt;/p&gt; &lt;/li&gt; &lt;li class="gt-sidebar-list-row"&gt; &lt;img class="gt-avatar-small" src="images/gt/avatar-small.gif" alt="avatar-small" width="25" height="25"/&gt; &lt;h4&gt;&lt;a href=""&gt;Sarah Smith&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;I love to draw...&lt;/p&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- /Sidebar List --&gt; &lt;/div&gt; &lt;!-- / sidebar --&gt; &lt;/div&gt; &lt;!-- / body --&gt; &lt;!-- footer --&gt; &lt;div class="gt-footer"&gt;&lt;div class="gt-footer-inner"&gt; &lt;p&gt;Copyright &amp;copy; 2010 Gooey Templates - &lt;a href="http://www.gooeytemplates.com" target="_blank"&gt;GooeyTemplates.com&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;/div&gt; &lt;!-- /footer --&gt; &lt;/body&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload