美文网首页
ActiveRecord::StatementInvalid i

ActiveRecord::StatementInvalid i

作者: 大猫城堡 | 来源:发表于2017-07-07 14:01 被阅读0次

    Showing /Users/lvchengbo/jdstore/app/views/common/_navbar.html.erb where line #18 raised:

    SQLite3::SQLException: no such column: cart_items.cart_id: SELECT COUNT(*) FROM "products" INNER JOIN "cart_items" ON "products"."id" = "cart_items"."product_id" WHERE "cart_items"."cart_id" = ?

    Extracted source (around line **#18**):
    161718192021 
    
    <li>
    <%= link_to "#" do %>
    购物车 <i class="fa fa-shopping-cart"> </i> ( <%= current_cart.products.count %> )
    <% end %>
    </li>
    <% if !current_user %>
    

    Trace of template inclusion: app/views/layouts/application.html.erb
    Rails.root: /Users/lvchengbo/jdstore

    Application Trace | Framework Trace | Full Traceapp/views/common/_navbar.html.erb:18:in block in _app_views_common__navbar_html_erb__861366649695980850_70202464562160'](http://localhost:3000/#)[app/views/common/_navbar.html.erb:17:in_app_views_common__navbar_html_erb__861366649695980850_70202464562160'app/views/layouts/application.html.erb:14:in `_app_views_layouts_application_html_erb___3704095119421627845_70202528987540'

    相关文章

      网友评论

          本文标题:ActiveRecord::StatementInvalid i

          本文链接:https://www.haomeiwen.com/subject/auwlhxtx.html