我正在做图像的CRUD ..我遇到错误“ExecJS :: ProgramError产品#索引TypeError:对象不支持此属性或方法”当我在我的视图中显示图像
问题:在我看来,我应该如何展示自己的形象? 这是为什么?
注意:我的朋友没有安装任何像imagemagik&paperclip ..我也试图在我的视图(assets / images文件夹)中显示一个静态图像,它不工作
视图
可执行的gem – Windows
find当前的Windows应用程序
(Windows Phone 10)是否可以编辑,在Windows Phone 10中以编程方式添加新联系人?
Windows Mobile 5 SDK是否适用于Windows 7.5芒果操作系统手机
<html> <head> <title>MY STORE!</title> </head> <body> <h1><align="center"> WELCOME TO MY STORE</h1> <%= link_to 'Add Product',new_product_path %> <table border = "1" width="100%"> <tr> <td>ID</td> <td>Name</td> <td>Image</td> <td>Size</td> <td>Price</td> <td>Created At</td> <td>Updated At</td> <td>Action</td> </tr> <% @product.each do |p| %> <tr> <td><%= p.id %></td> <td><%= p.name %></td> <td><%= image_tag p.image %></td> <td><%= p.size %></td> <td><%= p.price %></td> <td><%= p.created_at.strftime("%B,%d,%Y") %></td> <td><%= p.updated_at.strftime("%B,%Y") %></td> <td> <%= link_to 'View',product_path(p) %> <%= link_to 'Edit',edit_product_path(p) %> </td> </tr> <% end %> </table> </body> </html>
架构
# This file is auto-generated from the current state of the database. Instead # of editing this file,please use the migrations feature of Active Record to # incrementally modify your database,and then regenerate this schema deFinition. # # Note that this schema.rb deFinition is the authoritative source for your # database schema. If you need to create the application database on another # system,you should be using db:schema:load,not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass,the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20170406144121) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "carts",force: :cascade do |t| t.integer "product_id" t.integer "price" t.string "status" t.datetime "created_at",null: false t.datetime "updated_at",null: false end create_table "products",force: :cascade do |t| t.string "name" t.string "size" t.float "price" t.datetime "created_at",null: false t.string "image" end create_table "user",id: :integer,default: -> { "nextval('customers_id_seq'::regclass)" },force: :cascade do |t| t.string "full_name" t.string "product_name" t.string "size" t.float "price" t.datetime "created_at",null: false end add_foreign_key "carts","products" end
python读取文件非阻塞在Windows上
在Windows上安装python3 + lxml
无法追踪潜在的内存覆盖。 Windows奇怪
无法将IStorageItem投射到StorageFile
在windows10中安装natlink和python2.7的蜻蜓
该错误通常与Windows的CoffeeScript兼容性问题有关。 降级宝石应该可以解决这个问题。
找到您的coffee-script-gem并将其更改为以下内容:
gem 'coffee-script-source','1.8.0'
然后运行:
bundle update coffee-script-source
*请检查错误指向(文件和行)如果此解决方案不起作用,并更新您的问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。