Я использую этот CKEditor перл: https://github.com/galetahub/ckeditorRails CKEditor Gem дает 404
Я следовал инструкциям на README, но когда я пытаюсь поставить f.cktext_area
я получаю некоторые ошибки 404:
GET http://localhost:5000/ckeditor/config.js?t=DAED 404 (Not Found) ckeditor.js?body=1:78
GET http://localhost:5000/ckeditor/skins/moono/editor.css?t=DAED 404 (Not Found) ckeditor.js?body=1:78
GET http://localhost:5000/ckeditor/lang/en.js?t=DAED 404 (Not Found) ckeditor.js?body=1:78
Uncaught TypeError: Cannot set property 'dir' of undefined ckeditor.js?body=1:214
I запустили rails generate ckeditor:install --orm=active_record --backend=paperclip
и rake db:migrate
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
в application.rb
mount Ckeditor::Engine => '/ckeditor'
в routes.rb
и //= require ckeditor/init
находится в моем JS ...
Я также перезапустил свой сервер разработки, но я все еще получаю эти 404.
В моей rake routes
:
ckeditor /ckeditor Ckeditor::Engine
Routes for Ckeditor::Engine:
pictures GET /pictures(.:format) ckeditor/pictures#index
POST /pictures(.:format) ckeditor/pictures#create
picture DELETE /pictures/:id(.:format) ckeditor/pictures#destroy
attachment_files GET /attachment_files(.:format) ckeditor/attachment_files#index
POST /attachment_files(.:format) ckeditor/attachment_files#create
Я пропускаю что-то?
EDIT
Я хотел бы добавить, что localhost:5000/assets/ckeditor/config.js
делает работу, как это делают остальные предваряется /assets/
... почему не ckeditor.js
использовать правильный путь активов?
Я добавил задача, я должен выполнить эту задачу отдельно? –
@ error-404no вам не нужно. эта задача автоматически выполняется, когда вы нажимаете 'bundle exec rails assets: precompile' (или' bundle exec rake assets: precompile') – artificis