简体   繁体   English

路由错误,没有路由匹配“ GET” / ckeditor / pictures

[英]Routing error no route matches 'GET' /ckeditor/pictures

Am using ckeditor-rails for my app, I successfuly added the gem, installed, configured, and awesomely working, but when i click on browse button, the routing error displays on the screen, here am attaching the screenshot for reference, 在为我的应用程序使用ckeditor-rails时,我成功添加了gem,已安装,已配置并且可以正常工作,但是当我单击“浏览”按钮时,屏幕上会显示路由错误,此处附有屏幕截图以供参考, 在此处输入图片说明

and this is my optional configured config.js file details:- 这是我的可选配置的config.js文件详细信息:

CKEDITOR.editorConfig = function( config ) {
    config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
    config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
    config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
    config.filebrowserImageUploadUrl = "/ckeditor/pictures";
    config.filebrowserUploadUrl = "/ckeditor/attachment_files";  
    config.toolbar_basic = [
        [ 'Save', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord',
        '-', 'Undo', 'Redo' ],
        [ 'Bold', 'Italic', 'Underline',
        '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
        ['Smiley', 'Preview', 'Find', 'Replace', 'Link', 'Unlink', '-', 'Image' ],
        ['Table', 'Font', 'FontSize', '-', 'TextColor', 'BGColor', '-','Maximize']
    ];
    config.uiColor = "#eff4ff"
    config.toolbar = config.toolbar_basic;
};

My environment details: Ubuntu 12.04, ruby 1.9.3, rails 3.2.13. 我的环境详细信息:Ubuntu 12.04,ruby 1.9.3,rails 3.2.13。

Rake routes log: 耙路日志:

  ckeditor_rails_engine        /ckeditor                                                
Ckeditor::Rails::Engine
Routes for Ckeditor::Rails::Engine:

Please help me! 请帮我! many Thanks.. :) 非常感谢.. :)

Check your routes.rb file. 检查您的routes.rb文件。 It should contain something like mount Ckeditor::Engine => '/ckeditor' as per the gem documentation. 根据gem文档,它应该包含诸如mount Ckeditor::Engine => '/ckeditor'之类的内容。

Edit: it seems ckeditor-rails doesn't provide the file uploader component from ckeditor (CKFinder). 编辑:似乎ckeditor-rails不提供ckeditor(CKFinder)的文件上传器组件。 You can give a try to the ckeditor gem ( https://github.com/galetahub/ckeditor ), that provides that functionality in combination with paperclip. 您可以尝试一下ckeditor gem( https://github.com/galetahub/ckeditor ),它提供了与回形针结合使用的功能。 I've used it successfuly in many projects. 我已经在许多项目中成功使用了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM