When I try to insert an image into my blog I select the Upload tag and select my file and Send it to Server
. Then at the URL tab I select Browse Server
and I get the following error:
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
any ideas?
EDIT
I skipped a migration for the above problem. But I still can't upload a file. I'm getting this error:
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)
It looks like it's happening in Ckeditor::AttachmentFilesController#create
. But I didn't see this controller get generated when I installed the CKEditor gem. I found in another post that I must skip_before_filter :verify_authenticity_token
but like I said, I don't see Ckeditor::AttachmentFilesController#create
.