当我尝试将图像插入我的博客时,我选择上传标签并选择我的文件和Send it to Server
. 然后在我选择的 URL 选项卡上Browse Server
,我收到以下错误:
ActiveRecord::StatementInvalid in Ckeditor::AttachmentFilesController#index
PG::Error: ERROR: relation "ckeditor_assets" does not exist
LINE 5: WHERE a.attrelid = '"ckeditor_assets"'::regclas...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"ckeditor_assets"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
有任何想法吗?
编辑
我跳过了上述问题的迁移。但我仍然无法上传文件。我收到此错误:
Started POST "/ckeditor/attachment_files? CKEditor=blog_entry_body&CKEditorFuncNum=1&langCode=en" for 127.0.0.1 at 2013-05-24 18:10:29 -0500
Processing by Ckeditor::AttachmentFilesController#create as HTML
Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x000000047e3c28 @original_filename="me.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"upload\"; filename=\"me.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<Tempfile:/tmp/RackMultipart20130524-27036-1g7t9yd>>, "CKEditor"=>"blog_entry_body", "CKEditorFuncNum"=>"1", "langCode"=>"en"}
WARNING: Can't verify CSRF token authenticity
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = 'M96bQAv-NGdidsn7hypOJA' LIMIT 1
(0.2ms) BEGIN
(0.3ms) ROLLBACK
Rendered text template (0.0ms)
看起来它正在发生Ckeditor::AttachmentFilesController#create
。但是当我安装 CKEditor gem 时,我没有看到这个控制器生成。我在另一篇文章中发现我必须skip_before_filter :verify_authenticity_token
,但就像我说的,我没有看到Ckeditor::AttachmentFilesController#create
。